summaryrefslogtreecommitdiff
path: root/src/peds/Population.cpp
diff options
context:
space:
mode:
authorerorcun <erorcunerorcun@hotmail.com.tr>2021-02-28 17:18:48 +0300
committerSergeanur <s.anureev@yandex.ua>2021-06-24 21:32:39 +0300
commit8488dc791aa0f14958c2ac46bbf45e9812e14331 (patch)
treef3a0fd3b79f36c70b02722e4476f2e0f5271a76f /src/peds/Population.cpp
parentdf1ad8e122e43967710470e275844b62c4962e5d (diff)
Pointless fixes
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 a0bf8be6..5bbb7c4b 100644
--- a/src/peds/Population.cpp
+++ b/src/peds/Population.cpp
@@ -945,10 +945,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);