CGameProject: Make use of size_t where applicable

Plays nicely with standard containers.
This commit is contained in:
Lioncash
2020-06-18 05:34:56 -04:00
parent 6a0a20e3fa
commit 5ce6b972a0
6 changed files with 18 additions and 17 deletions

View File

@@ -102,26 +102,27 @@ void CProjectSettingsDialog::SetupPackagesList()
mpUI->PackagesList->clear();
if (!mpProject) return;
for (uint32 iPkg = 0; iPkg < mpProject->NumPackages(); iPkg++)
for (size_t iPkg = 0; iPkg < mpProject->NumPackages(); iPkg++)
{
CPackage *pPackage = mpProject->PackageByIndex(iPkg);
ASSERT(pPackage != nullptr);
QString PackageName = TO_QSTRING(pPackage->Name());
if (pPackage->NeedsRecook()) PackageName += '*';
if (pPackage->NeedsRecook())
PackageName += '*';
mpUI->PackagesList->addItem(PackageName);
}
}
void CProjectSettingsDialog::CookPackage()
{
uint32 PackageIdx = mpUI->PackagesList->currentRow();
const auto PackageIdx = static_cast<uint32>(mpUI->PackagesList->currentRow());
if (PackageIdx != -1)
{
CPackage *pPackage = mpProject->PackageByIndex(PackageIdx);
gpEdApp->CookPackage(pPackage);
}
if (PackageIdx == UINT32_MAX)
return;
CPackage *pPackage = mpProject->PackageByIndex(PackageIdx);
gpEdApp->CookPackage(pPackage);
}
void CProjectSettingsDialog::CookAllDirtyPackages()