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

@@ -122,7 +122,7 @@ void FallingTile::tick() {
CompoundTag* swap = new CompoundTag();
tileEntity->save(swap);
std::vector<Tag*>* allTags = tileData->getAllTags();
for (AUTO_VAR(it, allTags->begin());
for (auto it = allTags->begin();
it != allTags->end(); ++it) {
Tag* tag = *it;
if (tag->getName().compare(L"x") == 0 ||
@@ -173,7 +173,7 @@ void FallingTile::causeFallDamage(float distance) {
? DamageSource::anvil
: DamageSource::fallingBlock;
// for (Entity entity : entities)
for (AUTO_VAR(it, entities->begin()); it != entities->end(); ++it) {
for (auto it = entities->begin(); it != entities->end(); ++it) {
(*it)->hurt(source, std::min(Mth::floor(dmg * fallDamageAmount),
fallDamageMax));
}