summaryrefslogtreecommitdiffstats
path: root/src/peds/Population.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/peds/Population.cpp')
-rw-r--r--src/peds/Population.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/peds/Population.cpp b/src/peds/Population.cpp
index 5603e2c6..d7a545d8 100644
--- a/src/peds/Population.cpp
+++ b/src/peds/Population.cpp
@@ -911,10 +911,9 @@ CPopulation::MoveCarsAndPedsOutOfAbandonedZones()
void
CPopulation::ConvertAllObjectsToDummyObjects()
{
- int poolSize = CPools::GetObjectPool()->GetSize();
- for (int poolIndex = poolSize - 1; poolIndex >= 0; poolIndex--) {
-
- CObject *obj = CPools::GetObjectPool()->GetSlot(poolIndex);
+ uint32 i = CPools::GetObjectPool()->GetSize();
+ while(i--) {
+ CObject *obj = CPools::GetObjectPool()->GetSlot(i);
if (obj) {
if (obj->CanBeDeleted())
ConvertToDummyObject(obj);