refactor: expand AUTO_VAR macro

This commit is contained in:
Tropical
2026-03-29 23:59:05 -05:00
parent a330ecdcbb
commit e45151ae64
201 changed files with 1051 additions and 1055 deletions

View File

@@ -17,7 +17,7 @@ UpdatePlayerRuleDefinition::UpdatePlayerRuleDefinition() {
}
UpdatePlayerRuleDefinition::~UpdatePlayerRuleDefinition() {
for (AUTO_VAR(it, m_items.begin()); it != m_items.end(); ++it) {
for (auto it = m_items.begin(); it != m_items.end(); ++it) {
delete *it;
}
}
@@ -54,7 +54,7 @@ void UpdatePlayerRuleDefinition::writeAttributes(DataOutputStream* dos,
void UpdatePlayerRuleDefinition::getChildren(
std::vector<GameRuleDefinition*>* children) {
GameRuleDefinition::getChildren(children);
for (AUTO_VAR(it, m_items.begin()); it != m_items.end(); it++)
for (auto it = m_items.begin(); it != m_items.end(); it++)
children->push_back(*it);
}
@@ -147,7 +147,7 @@ void UpdatePlayerRuleDefinition::postProcessPlayer(
if (m_spawnPos != NULL || m_bUpdateYRot)
player->absMoveTo(x, y, z, yRot, xRot);
for (AUTO_VAR(it, m_items.begin()); it != m_items.end(); ++it) {
for (auto it = m_items.begin(); it != m_items.end(); ++it) {
AddItemRuleDefinition* addItem = *it;
addItem->addItemToContainer(player->inventory, -1);