From 400e88b3c31966466557e2a106610824caf721d6 Mon Sep 17 00:00:00 2001 From: lopsi <40902730+Lpsd@users.noreply.github.com> Date: Mon, 17 Jun 2024 22:51:32 +0100 Subject: [PATCH] Update CWaterManager.cpp Co-authored-by: Marek Kulik --- Server/mods/deathmatch/logic/CWaterManager.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Server/mods/deathmatch/logic/CWaterManager.cpp b/Server/mods/deathmatch/logic/CWaterManager.cpp index f5cce19267..ac00ceb042 100644 --- a/Server/mods/deathmatch/logic/CWaterManager.cpp +++ b/Server/mods/deathmatch/logic/CWaterManager.cpp @@ -71,11 +71,8 @@ void CWaterManager::SetAllElementWaterLevel(float fLevel) void CWaterManager::ResetAllElementWaterLevel() { - std::list::const_iterator iter = m_List.begin(); - for (; iter != m_List.end(); ++iter) - { - (*iter)->ResetLevel(); - } + for (CWater* pWater : m_List) + pWater->ResetLevel(); } void CWaterManager::ResetElementWaterLevel(CWater* pWater)