From 899efd5220dceef733f8c754d271ff9f186415d8 Mon Sep 17 00:00:00 2001 From: Uladzislau Nikalayevich Date: Sun, 4 Aug 2024 20:10:55 +0300 Subject: [PATCH] Use auto for loop iterator --- Client/game_sa/CDummyPoolSA.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Client/game_sa/CDummyPoolSA.cpp b/Client/game_sa/CDummyPoolSA.cpp index dead250f75..5985bcfbf9 100644 --- a/Client/game_sa/CDummyPoolSA.cpp +++ b/Client/game_sa/CDummyPoolSA.cpp @@ -31,7 +31,7 @@ void CDummyPoolSA::RemoveAllWithBackup() m_pOriginalElementsBackup = std::make_unique(); auto pDummyPool = (*m_ppDummyPoolInterface); - for (size_t i = 0; i < MAX_DUMMIES_DEFAULT; i++) + for (auto i = 0; i < MAX_DUMMIES_DEFAULT; i++) { if (pDummyPool->IsContains(i)) { @@ -59,7 +59,7 @@ void CDummyPoolSA::RestoreBackup() auto& originalData = *m_pOriginalElementsBackup; auto pDummyPool = (*m_ppDummyPoolInterface); - for (size_t i = 0; i < MAX_DUMMIES_DEFAULT; i++) + for (auto i = 0; i < MAX_DUMMIES_DEFAULT; i++) { if (originalData[i].first) { @@ -80,7 +80,7 @@ void CDummyPoolSA::UpdateBuildingLods(void* oldPool, void* newPool) if (m_pOriginalElementsBackup) { - for (int i = 0; i < (*m_pOriginalElementsBackup).size(); i++) + for (auto i = 0; i < (*m_pOriginalElementsBackup).size(); i++) { if ((*m_pOriginalElementsBackup)[i].first) { @@ -94,7 +94,7 @@ void CDummyPoolSA::UpdateBuildingLods(void* oldPool, void* newPool) } else { - for (int i = 0; i < (*m_ppDummyPoolInterface)->Size(); i++) + for (auto i = 0; i < (*m_ppDummyPoolInterface)->Size(); i++) { CEntitySAInterface* object = (*m_ppDummyPoolInterface)->GetObject(i); if (object->m_pLod)