Remove AUTO_VAR macro and _toString function (#592)

This commit is contained in:
void_17
2026-03-06 02:11:18 +07:00
committed by GitHub
parent 7d6658fe5b
commit 55231bb8d3
294 changed files with 5067 additions and 5773 deletions

View File

@@ -134,22 +134,22 @@ void RepairMenu::createResult()
unordered_map<int, int> *additionalEnchantments = EnchantmentHelper::getEnchantments(addition);
for(AUTO_VAR(it, additionalEnchantments->begin()); it != additionalEnchantments->end(); ++it)
for(auto& it : *additionalEnchantments)
{
int id = it->first;
int id = it.first;
Enchantment *enchantment = Enchantment::enchantments[id];
AUTO_VAR(localIt, enchantments->find(id));
int current = localIt != enchantments->end() ? localIt->second : 0;
int level = it->second;
auto localIt = enchantments->find(id);
int current = localIt != enchantments->end() ? localIt->second : 0;
int level = it.second;
level = (current == level) ? level += 1 : max(level, current);
int extra = level - current;
bool compatible = enchantment->canEnchant(input);
if (player->abilities.instabuild) compatible = true;
for(AUTO_VAR(it2, enchantments->begin()); it2 != enchantments->end(); ++it2)
for(auto& it2 : *enchantments)
{
int other = it2->first;
int other = it2.first;
if (other != id && !enchantment->isCompatibleWith(Enchantment::enchantments[other]))
{
compatible = false;
@@ -219,11 +219,11 @@ void RepairMenu::createResult()
}
int count = 0;
for(AUTO_VAR(it, enchantments->begin()); it != enchantments->end(); ++it)
for(auto& it : *enchantments)
{
int id = it->first;
int id = it.first;
Enchantment *enchantment = Enchantment::enchantments[id];
int level = it->second;
int level = it.second;
int fee = 0;
count++;