diff options
| author | void_17 <61356189+void2012@users.noreply.github.com> | 2026-03-06 02:11:18 +0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-06 02:11:18 +0700 |
| commit | 55231bb8d3e1a4e2752ac3d444c4287eb0ca4e8b (patch) | |
| tree | 953c537a5c66e328e9f4ab29626cf738112d53c0 /Minecraft.Client/Common/GameRules/CompleteAllRuleDefinition.cpp | |
| parent | 7d6658fe5b3095f35093701b5ab669ffc291e875 (diff) | |
Remove AUTO_VAR macro and _toString function (#592)
Diffstat (limited to 'Minecraft.Client/Common/GameRules/CompleteAllRuleDefinition.cpp')
| -rw-r--r-- | Minecraft.Client/Common/GameRules/CompleteAllRuleDefinition.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
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<int>(values->progress)); - newDesc = replaceAll(newDesc,L"{*goal*}",_toString<int>(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 |
