From 71d99cbd4ceb9d07a08b10ffcdbd0eb1756db540 Mon Sep 17 00:00:00 2001 From: Uladzislau Nikalayevich Date: Wed, 21 Aug 2024 22:54:12 +0300 Subject: [PATCH] Use range loop --- Client/game_sa/CDummyPoolSA.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Client/game_sa/CDummyPoolSA.cpp b/Client/game_sa/CDummyPoolSA.cpp index 5a85061f10..6a67cdb900 100644 --- a/Client/game_sa/CDummyPoolSA.cpp +++ b/Client/game_sa/CDummyPoolSA.cpp @@ -84,11 +84,11 @@ void CDummyPoolSA::UpdateBuildingLods(const std::uint32_t offset) void CDummyPoolSA::UpdateBackupLodOffset(const std::uint32_t offset) { - for (auto i = 0; i < (*m_pOriginalElementsBackup).size(); i++) + for (auto& it : *m_pOriginalElementsBackup) { - if ((*m_pOriginalElementsBackup)[i].first) + if (it.first) { - CEntitySAInterface* object = &(*m_pOriginalElementsBackup)[i].second; + CEntitySAInterface* object = &it.second; CEntitySAInterface* lod = object->GetLod(); if (lod) object->SetLod((CEntitySAInterface*)((std::uint32_t)lod + offset));