Using zero-initializer for defaults in the Json Serializer instead of explicit values
This commit is contained in:
@@ -84,7 +84,7 @@ namespace AZ
|
||||
|
||||
if (IsExplicitDefault(inputValue))
|
||||
{
|
||||
*valAsBool = false;
|
||||
*valAsBool = {};
|
||||
return context.Report(JSR::Tasks::ReadField, JSR::Outcomes::DefaultsUsed, "Boolean value set to default of 'false'.");
|
||||
}
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ namespace AZ
|
||||
|
||||
if (isExplicitDefault)
|
||||
{
|
||||
*outputValue = 0.0f;
|
||||
*outputValue = {};
|
||||
return context.Report(JSR::Tasks::ReadField, JSR::Outcomes::DefaultsUsed, "Floating point value set to default of 0.0.");
|
||||
}
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ namespace AZ
|
||||
|
||||
if (isDefaultValue)
|
||||
{
|
||||
*outputValue = 0;
|
||||
*outputValue = {};
|
||||
return context.Report(JSR::Tasks::ReadField, JSR::Outcomes::DefaultsUsed, "Integer value set to default of zero.");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user