Remove an unused variable and explicitly initialize some bools to false

Signed-off-by: Daniel Edwards <dev@danieledwards.de>
This commit is contained in:
Daniel Edwards
2022-01-27 23:04:15 +01:00
parent 117cb11505
commit aa093945a6
4 changed files with 3 additions and 5 deletions
+1 -1
View File
@@ -101,7 +101,7 @@ void CEditorPreferencesPage_AWS::SaveSettingsRegistryFile()
return;
}
[[maybe_unused]] bool saved{};
[[maybe_unused]] bool saved = false;
constexpr auto configurationMode =
AZ::IO::SystemFile::SF_OPEN_CREATE | AZ::IO::SystemFile::SF_OPEN_CREATE_PATH | AZ::IO::SystemFile::SF_OPEN_WRITE_ONLY;
if (AZ::IO::SystemFile outputFile; outputFile.Open(resolvedPath.data(), configurationMode))
-2
View File
@@ -499,14 +499,12 @@ void CEntityObject::AdjustLightProperties(CVarBlockPtr& properties, const char*
pAreaLight->SetHumanName("PlanarLight");
}
bool bCastShadowLegacy = false; // Backward compatibility for existing shadow casting lights
if (IVariable* pCastShadowVarLegacy = FindVariableInSubBlock(properties, pSubBlockVar, "bCastShadow"))
{
pCastShadowVarLegacy->SetFlags(pCastShadowVarLegacy->GetFlags() | IVariable::UI_INVISIBLE);
const QString zeroPrefix("0");
if (!pCastShadowVarLegacy->GetDisplayValue().startsWith(zeroPrefix))
{
bCastShadowLegacy = true;
pCastShadowVarLegacy->SetDisplayValue(zeroPrefix);
}
}
+1 -1
View File
@@ -1084,7 +1084,7 @@ void SEditorSettings::SaveSettingsRegistryFile()
return;
}
[[maybe_unused]] bool saved{};
[[maybe_unused]] bool saved = false;
constexpr auto configurationMode = AZ::IO::SystemFile::SF_OPEN_CREATE
| AZ::IO::SystemFile::SF_OPEN_CREATE_PATH
| AZ::IO::SystemFile::SF_OPEN_WRITE_ONLY;
@@ -223,7 +223,7 @@ namespace AWSCore
return;
}
[[maybe_unused]] bool saved {};
[[maybe_unused]] bool saved = false;
constexpr auto configurationMode =
AZ::IO::SystemFile::SF_OPEN_CREATE | AZ::IO::SystemFile::SF_OPEN_CREATE_PATH | AZ::IO::SystemFile::SF_OPEN_WRITE_ONLY;
if (AZ::IO::SystemFile outputFile; outputFile.Open(resolvedPathAWSPreference.c_str(), configurationMode))