General: Qualify const where applicable
This commit is contained in:
parent
2b7513b156
commit
46926ef4bf
|
@ -301,7 +301,7 @@ CResourceEntry* CResourceStore::FindEntry(const CAssetID& rkID) const
|
|||
|
||||
if (Found != mResourceEntries.cend())
|
||||
{
|
||||
auto& pEntry = Found->second;
|
||||
const auto& pEntry = Found->second;
|
||||
|
||||
if (!pEntry->IsMarkedForDeletion())
|
||||
return pEntry.get();
|
||||
|
@ -450,7 +450,7 @@ CResourceEntry* CResourceStore::CreateNewResource(const CAssetID& rkID, EResourc
|
|||
if (IsValidResourcePath(rkDir, rkName))
|
||||
{
|
||||
auto res = CResourceEntry::CreateNewResource(this, rkID, rkDir, rkName, Type, ExistingResource);
|
||||
auto resPtr = res.get();
|
||||
auto* resPtr = res.get();
|
||||
|
||||
mResourceEntries.insert_or_assign(rkID, std::move(res));
|
||||
mDatabaseCacheDirty = true;
|
||||
|
|
|
@ -145,16 +145,15 @@ public:
|
|||
std::set<CAnimPrimitive> PrimitiveSet;
|
||||
|
||||
// Animations
|
||||
for (auto& anim : mAnimations)
|
||||
for (const auto& anim : mAnimations)
|
||||
{
|
||||
anim.pMetaAnim->GetUniquePrimitives(PrimitiveSet);
|
||||
}
|
||||
|
||||
CSourceAnimData *pAnimData = gpResourceStore->LoadResource<CSourceAnimData>(rkChar.AnimDataID);
|
||||
if (pAnimData)
|
||||
if (auto* pAnimData = gpResourceStore->LoadResource<CSourceAnimData>(rkChar.AnimDataID))
|
||||
pAnimData->AddTransitionDependencies(pTree.get());
|
||||
|
||||
for (auto& prim : PrimitiveSet)
|
||||
for (const auto& prim : PrimitiveSet)
|
||||
{
|
||||
pTree->AddDependency(prim.Animation());
|
||||
}
|
||||
|
|
|
@ -102,7 +102,7 @@ public:
|
|||
break;
|
||||
|
||||
// Add all transition primitives to the tree
|
||||
for (auto& primitive : PrimSet)
|
||||
for (const auto& primitive : PrimSet)
|
||||
pTree->AddDependency(primitive.Animation());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -101,7 +101,7 @@ EMetaAnimType CMetaAnimRandom::Type() const
|
|||
|
||||
void CMetaAnimRandom::GetUniquePrimitives(std::set<CAnimPrimitive>& rPrimSet) const
|
||||
{
|
||||
for (auto& pair : mProbabilityPairs)
|
||||
for (const auto& pair : mProbabilityPairs)
|
||||
pair.pAnim->GetUniquePrimitives(rPrimSet);
|
||||
}
|
||||
|
||||
|
@ -126,6 +126,6 @@ EMetaAnimType CMetaAnimSequence::Type() const
|
|||
|
||||
void CMetaAnimSequence::GetUniquePrimitives(std::set<CAnimPrimitive>& rPrimSet) const
|
||||
{
|
||||
for (auto& anim : mAnimations)
|
||||
for (const auto& anim : mAnimations)
|
||||
anim->GetUniquePrimitives(rPrimSet);
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@ void CResTypeInfo::GetAllTypesInGame(EGame Game, std::list<CResTypeInfo*>& rOut)
|
|||
{
|
||||
for (const auto& entry : smTypeMap)
|
||||
{
|
||||
auto& type = entry.second;
|
||||
const auto& type = entry.second;
|
||||
|
||||
if (type->IsInGame(Game))
|
||||
rOut.push_back(type.get());
|
||||
|
|
Loading…
Reference in New Issue