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