CAnimSet: Make use of size_t where applicable

This commit is contained in:
Lioncash
2020-06-22 22:26:35 -04:00
parent d52b05d71c
commit a2ecb2a98c
9 changed files with 40 additions and 38 deletions

View File

@@ -503,9 +503,9 @@ void GenerateAssetNames(CGameProject *pProj)
{
TString SetDir = It->DirectoryPath();
TString NewSetName;
CAnimSet *pSet = (CAnimSet*) It->Load();
auto* pSet = static_cast<CAnimSet*>(It->Load());
for (uint32 iChar = 0; iChar < pSet->NumCharacters(); iChar++)
for (size_t iChar = 0; iChar < pSet->NumCharacters(); iChar++)
{
const SSetCharacter *pkChar = pSet->Character(iChar);

View File

@@ -104,15 +104,15 @@ void CCharacterUsageMap::Clear()
void CCharacterUsageMap::DebugPrintContents()
{
for (auto& [ID, usedList] : mUsageMap)
for (const auto& [ID, usedList] : mUsageMap)
{
const CAnimSet *pSet = mpStore->LoadResource<CAnimSet>(ID);
const auto* pSet = mpStore->LoadResource<CAnimSet>(ID);
for (uint32 iChar = 0; iChar < pSet->NumCharacters(); iChar++)
for (size_t iChar = 0; iChar < pSet->NumCharacters(); iChar++)
{
const bool Used = usedList.size() > iChar && usedList[iChar];
const TString CharName = pSet->Character(iChar)->Name;
debugf("%s : Char %d : %s : %s", *ID.ToString(), iChar, *CharName, (Used ? "USED" : "UNUSED"));
debugf("%s : Char %zu : %s : %s", *ID.ToString(), iChar, *CharName, (Used ? "USED" : "UNUSED"));
}
}
}