Merge pull request #7213 from siretty/cleanup_unused_var_empty_line_bool_init

Remove an Unused Variable Breaking the Build With Clang 13 on Linux and Minor Cleanup
monroegm-disable-blank-issue-2
Chris Galvan 4 years ago committed by GitHub
commit 05ece2adba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -101,7 +101,7 @@ void CEditorPreferencesPage_AWS::SaveSettingsRegistryFile()
return; return;
} }
[[maybe_unused]] bool saved{}; [[maybe_unused]] bool saved = false;
constexpr auto configurationMode = constexpr auto configurationMode =
AZ::IO::SystemFile::SF_OPEN_CREATE | AZ::IO::SystemFile::SF_OPEN_CREATE_PATH | AZ::IO::SystemFile::SF_OPEN_WRITE_ONLY; 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)) if (AZ::IO::SystemFile outputFile; outputFile.Open(resolvedPath.data(), configurationMode))

@ -499,14 +499,12 @@ void CEntityObject::AdjustLightProperties(CVarBlockPtr& properties, const char*
pAreaLight->SetHumanName("PlanarLight"); pAreaLight->SetHumanName("PlanarLight");
} }
bool bCastShadowLegacy = false; // Backward compatibility for existing shadow casting lights
if (IVariable* pCastShadowVarLegacy = FindVariableInSubBlock(properties, pSubBlockVar, "bCastShadow")) if (IVariable* pCastShadowVarLegacy = FindVariableInSubBlock(properties, pSubBlockVar, "bCastShadow"))
{ {
pCastShadowVarLegacy->SetFlags(pCastShadowVarLegacy->GetFlags() | IVariable::UI_INVISIBLE); pCastShadowVarLegacy->SetFlags(pCastShadowVarLegacy->GetFlags() | IVariable::UI_INVISIBLE);
const QString zeroPrefix("0"); const QString zeroPrefix("0");
if (!pCastShadowVarLegacy->GetDisplayValue().startsWith(zeroPrefix)) if (!pCastShadowVarLegacy->GetDisplayValue().startsWith(zeroPrefix))
{ {
bCastShadowLegacy = true;
pCastShadowVarLegacy->SetDisplayValue(zeroPrefix); pCastShadowVarLegacy->SetDisplayValue(zeroPrefix);
} }
} }

@ -1084,7 +1084,7 @@ void SEditorSettings::SaveSettingsRegistryFile()
return; return;
} }
[[maybe_unused]] bool saved{}; [[maybe_unused]] bool saved = false;
constexpr auto configurationMode = AZ::IO::SystemFile::SF_OPEN_CREATE constexpr auto configurationMode = AZ::IO::SystemFile::SF_OPEN_CREATE
| AZ::IO::SystemFile::SF_OPEN_CREATE_PATH | AZ::IO::SystemFile::SF_OPEN_CREATE_PATH
| AZ::IO::SystemFile::SF_OPEN_WRITE_ONLY; | AZ::IO::SystemFile::SF_OPEN_WRITE_ONLY;

@ -223,7 +223,7 @@ namespace AWSCore
return; return;
} }
[[maybe_unused]] bool saved {}; [[maybe_unused]] bool saved = false;
constexpr auto configurationMode = constexpr auto configurationMode =
AZ::IO::SystemFile::SF_OPEN_CREATE | AZ::IO::SystemFile::SF_OPEN_CREATE_PATH | AZ::IO::SystemFile::SF_OPEN_WRITE_ONLY; 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)) if (AZ::IO::SystemFile outputFile; outputFile.Open(resolvedPathAWSPreference.c_str(), configurationMode))

Loading…
Cancel
Save