mirror of
https://github.com/AxioDL/PrimeWorldEditor.git
synced 2025-12-18 17:35:43 +00:00
CBasicModel: Make use of size_t where applicable
Same behavior, but without some internal variable truncation.
This commit is contained in:
@@ -61,18 +61,17 @@ void CGameArea::MergeTerrain()
|
||||
if (mTerrainMerged) return;
|
||||
|
||||
// Nothing really complicated here - iterate through every terrain submesh, add each to a static model
|
||||
for (uint32 iMdl = 0; iMdl < mWorldModels.size(); iMdl++)
|
||||
for (auto& pMdl : mWorldModels)
|
||||
{
|
||||
auto& pMdl = mWorldModels[iMdl];
|
||||
uint32 SubmeshCount = pMdl->GetSurfaceCount();
|
||||
const size_t SubmeshCount = pMdl->GetSurfaceCount();
|
||||
|
||||
for (uint32 iSurf = 0; iSurf < SubmeshCount; iSurf++)
|
||||
for (size_t iSurf = 0; iSurf < SubmeshCount; iSurf++)
|
||||
{
|
||||
SSurface *pSurf = pMdl->GetSurface(iSurf);
|
||||
CMaterial *pMat = mpMaterialSet->MaterialByIndex(pSurf->MaterialID, false);
|
||||
|
||||
bool NewMat = true;
|
||||
for (auto it = mStaticWorldModels.begin(); it != mStaticWorldModels.end(); it++)
|
||||
for (auto it = mStaticWorldModels.begin(); it != mStaticWorldModels.end(); ++it)
|
||||
{
|
||||
if ((*it)->GetMaterial() == pMat)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user