mirror of
https://github.com/AxioDL/PrimeWorldEditor.git
synced 2025-12-16 08:27:01 +00:00
CGameProject: Make use of size_t where applicable
Plays nicely with standard containers.
This commit is contained in:
@@ -109,11 +109,11 @@ void GenerateAssetNames(CGameProject *pProj)
|
||||
// Generate names for package named resources
|
||||
debugf("Processing packages");
|
||||
|
||||
for (uint32 iPkg = 0; iPkg < pProj->NumPackages(); iPkg++)
|
||||
for (size_t iPkg = 0; iPkg < pProj->NumPackages(); iPkg++)
|
||||
{
|
||||
CPackage *pPkg = pProj->PackageByIndex(iPkg);
|
||||
|
||||
for (uint32 iRes = 0; iRes < pPkg->NumNamedResources(); iRes++)
|
||||
for (size_t iRes = 0; iRes < pPkg->NumNamedResources(); iRes++)
|
||||
{
|
||||
const SNamedResource& rkRes = pPkg->NamedResourceByIndex(iRes);
|
||||
if (rkRes.Name.EndsWith("NODEPEND")) continue;
|
||||
|
||||
@@ -669,11 +669,11 @@ TString CGameExporter::MakeWorldName(CAssetID WorldID)
|
||||
// Find the original world name in the package resource names
|
||||
TString WorldName;
|
||||
|
||||
for (uint32 iPkg = 0; iPkg < mpProject->NumPackages(); iPkg++)
|
||||
for (size_t iPkg = 0; iPkg < mpProject->NumPackages(); iPkg++)
|
||||
{
|
||||
CPackage *pPkg = mpProject->PackageByIndex(iPkg);
|
||||
|
||||
for (uint32 iRes = 0; iRes < pPkg->NumNamedResources(); iRes++)
|
||||
for (size_t iRes = 0; iRes < pPkg->NumNamedResources(); iRes++)
|
||||
{
|
||||
const SNamedResource& rkRes = pPkg->NamedResourceByIndex(iRes);
|
||||
|
||||
|
||||
@@ -87,8 +87,8 @@ public:
|
||||
void SetProjectName(TString name) { mProjectName = std::move(name); }
|
||||
|
||||
TString Name() const { return mProjectName; }
|
||||
uint32 NumPackages() const { return mPackages.size(); }
|
||||
CPackage* PackageByIndex(uint32 Index) const { return mPackages[Index].get(); }
|
||||
size_t NumPackages() const { return mPackages.size(); }
|
||||
CPackage* PackageByIndex(size_t Index) const { return mPackages[Index].get(); }
|
||||
void AddPackage(std::unique_ptr<CPackage>&& package) { mPackages.push_back(std::move(package)); }
|
||||
CResourceStore* ResourceStore() const { return mpResourceStore.get(); }
|
||||
CGameInfo* GameInfo() const { return mpGameInfo.get(); }
|
||||
|
||||
@@ -330,7 +330,7 @@ bool CResourceEntry::Save(bool SkipCacheSave /*= false*/, bool FlagForRecook /*=
|
||||
// Flag dirty any packages that contain this resource.
|
||||
if (FlagForRecook)
|
||||
{
|
||||
for (uint32 iPkg = 0; iPkg < mpStore->Project()->NumPackages(); iPkg++)
|
||||
for (size_t iPkg = 0; iPkg < mpStore->Project()->NumPackages(); iPkg++)
|
||||
{
|
||||
CPackage *pPkg = mpStore->Project()->PackageByIndex(iPkg);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user