summaryrefslogtreecommitdiff
path: root/src
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
parentdf1ad8e122e43967710470e275844b62c4962e5d (diff)
Pointless fixes
Diffstat (limited to 'src')
-rw-r--r--src/peds/Population.cpp7
-rw-r--r--src/vehicles/Automobile.cpp2
2 files changed, 4 insertions, 5 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);
diff --git a/src/vehicles/Automobile.cpp b/src/vehicles/Automobile.cpp
index c2cf26b9..c29c0536 100644
--- a/src/vehicles/Automobile.cpp
+++ b/src/vehicles/Automobile.cpp
@@ -4050,7 +4050,7 @@ CAutomobile::GetHeightAboveRoad(void)
void
CAutomobile::PlayCarHorn(void)
{
- int r;
+ uint32 r;
if(m_nCarHornTimer != 0)
return;