Clang/Clazy pass over AzCore (#5045)
* Multiple cleanups ( tidy etc. ) Coalesce nested namespaces. Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com> * Multiple cleanups ( tidy etc. ) cntd. Converted Uuid into POD ( defaulted the constructor ) Add `&/const &` to `for` loops that benefit from their use Some Qt optimizations ( string ref, prevent container detaches, etc. ) Replace `::bind` in a few places. Replaced the use of AZ_CRC with AZ_CRC_CE in a few places. Replace a few `typedef`s with `using`s Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com> * Linux compilation fix. Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com> * Apply review suggestions. Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com> * Fix vs2019 build Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com> * Small clang re-format in StringFunc.cpp Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com> * Apply reviewer's suggestions. Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>
This commit is contained in:
@@ -1649,7 +1649,7 @@ QString CBaseObject::GetTypeName() const
|
||||
}
|
||||
|
||||
QString name;
|
||||
name.append(className.mid(0, className.length() - subClassName.length()));
|
||||
name.append(className.midRef(0, className.length() - subClassName.length()));
|
||||
return name;
|
||||
}
|
||||
|
||||
|
||||
@@ -592,11 +592,11 @@ void CEntityObject::AdjustLightProperties(CVarBlockPtr& properties, const char*
|
||||
if (IVariable* pCastShadowVarLegacy = FindVariableInSubBlock(properties, pSubBlockVar, "bCastShadow"))
|
||||
{
|
||||
pCastShadowVarLegacy->SetFlags(pCastShadowVarLegacy->GetFlags() | IVariable::UI_INVISIBLE);
|
||||
|
||||
if (pCastShadowVarLegacy->GetDisplayValue()[0] != '0')
|
||||
const QString zeroPrefix("0");
|
||||
if (!pCastShadowVarLegacy->GetDisplayValue().startsWith(zeroPrefix))
|
||||
{
|
||||
bCastShadowLegacy = true;
|
||||
pCastShadowVarLegacy->SetDisplayValue("0");
|
||||
pCastShadowVarLegacy->SetDisplayValue(zeroPrefix);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -828,7 +828,7 @@ void CObjectManager::ShowLastHiddenObject()
|
||||
{
|
||||
uint64 mostRecentID = CBaseObject::s_invalidHiddenID;
|
||||
CBaseObject* mostRecentObject = nullptr;
|
||||
for (auto it : m_objects)
|
||||
for (const auto& it : m_objects)
|
||||
{
|
||||
CBaseObject* obj = it.second;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user