Skip to content

Commit

Permalink
Use auto for loop iterator
Browse files Browse the repository at this point in the history
  • Loading branch information
TheNormalnij committed Aug 4, 2024
1 parent a20dd15 commit 899efd5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Client/game_sa/CDummyPoolSA.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ void CDummyPoolSA::RemoveAllWithBackup()
m_pOriginalElementsBackup = std::make_unique<pool_backup_t>();

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))
{
Expand Down Expand Up @@ -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)
{
Expand All @@ -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)
{
Expand All @@ -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)
Expand Down

0 comments on commit 899efd5

Please sign in to comment.