From 55231bb8d3e1a4e2752ac3d444c4287eb0ca4e8b Mon Sep 17 00:00:00 2001 From: void_17 <61356189+void2012@users.noreply.github.com> Date: Fri, 6 Mar 2026 02:11:18 +0700 Subject: Remove AUTO_VAR macro and _toString function (#592) --- .../Common/GameRules/CompleteAllRuleDefinition.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'Minecraft.Client/Common/GameRules/CompleteAllRuleDefinition.cpp') diff --git a/Minecraft.Client/Common/GameRules/CompleteAllRuleDefinition.cpp b/Minecraft.Client/Common/GameRules/CompleteAllRuleDefinition.cpp index adaf70c8..b928b26c 100644 --- a/Minecraft.Client/Common/GameRules/CompleteAllRuleDefinition.cpp +++ b/Minecraft.Client/Common/GameRules/CompleteAllRuleDefinition.cpp @@ -28,12 +28,12 @@ void CompleteAllRuleDefinition::updateStatus(GameRule *rule) { int goal = 0; int progress = 0; - for(AUTO_VAR(it, rule->m_parameters.begin()); it != rule->m_parameters.end(); ++it) + for (auto& it : rule->m_parameters ) { - if(it->second.isPointer) + if(it.second.isPointer) { - goal += it->second.gr->getGameRuleDefinition()->getGoal(); - progress += it->second.gr->getGameRuleDefinition()->getProgress(it->second.gr); + goal += it.second.gr->getGameRuleDefinition()->getGoal(); + progress += it.second.gr->getGameRuleDefinition()->getProgress(it.second.gr); } } if(rule->getConnection() != NULL) @@ -44,9 +44,9 @@ void CompleteAllRuleDefinition::updateStatus(GameRule *rule) int icon = -1; int auxValue = 0; - + if(m_lastRuleStatusChanged != NULL) - { + { icon = m_lastRuleStatusChanged->getIcon(); auxValue = m_lastRuleStatusChanged->getAuxValue(); m_lastRuleStatusChanged = NULL; @@ -60,7 +60,7 @@ wstring CompleteAllRuleDefinition::generateDescriptionString(const wstring &desc { PacketData *values = (PacketData *)data; wstring newDesc = description; - newDesc = replaceAll(newDesc,L"{*progress*}",_toString(values->progress)); - newDesc = replaceAll(newDesc,L"{*goal*}",_toString(values->goal)); + newDesc = replaceAll(newDesc,L"{*progress*}",std::to_wstring(values->progress)); + newDesc = replaceAll(newDesc,L"{*goal*}",std::to_wstring(values->goal)); return newDesc; } \ No newline at end of file -- cgit v1.2.3