aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.World/RandomScatteredLargeFeature.cpp
diff options
context:
space:
mode:
authorvoid_17 <61356189+void2012@users.noreply.github.com>2026-03-06 02:11:18 +0700
committerGitHub <noreply@github.com>2026-03-06 02:11:18 +0700
commit55231bb8d3e1a4e2752ac3d444c4287eb0ca4e8b (patch)
tree953c537a5c66e328e9f4ab29626cf738112d53c0 /Minecraft.World/RandomScatteredLargeFeature.cpp
parent7d6658fe5b3095f35093701b5ab669ffc291e875 (diff)
Remove AUTO_VAR macro and _toString function (#592)
Diffstat (limited to 'Minecraft.World/RandomScatteredLargeFeature.cpp')
-rw-r--r--Minecraft.World/RandomScatteredLargeFeature.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/Minecraft.World/RandomScatteredLargeFeature.cpp b/Minecraft.World/RandomScatteredLargeFeature.cpp
index 2a2290e3..bd0b70bb 100644
--- a/Minecraft.World/RandomScatteredLargeFeature.cpp
+++ b/Minecraft.World/RandomScatteredLargeFeature.cpp
@@ -34,11 +34,11 @@ RandomScatteredLargeFeature::RandomScatteredLargeFeature(unordered_map<wstring,
{
_init();
- for(AUTO_VAR(it, options.begin()); it != options.end(); ++it)
+ for(auto& option : options)
{
- if (it->first.compare(OPTION_SPACING) == 0)
+ if (option.first.compare(OPTION_SPACING) == 0)
{
- spacing = Mth::getInt(it->second, spacing, minSeparation + 1);
+ spacing = Mth::getInt(option.second, spacing, minSeparation + 1);
}
}
}
@@ -75,9 +75,8 @@ bool RandomScatteredLargeFeature::isFeatureChunk(int x, int z, bool bIsSuperflat
if (forcePlacement || (x == xCenterFeatureChunk && z == zCenterFeatureChunk))
{
Biome *biome = level->getBiomeSource()->getBiome(x * 16 + 8, z * 16 + 8);
- for (AUTO_VAR(it,allowedBiomes.begin()); it != allowedBiomes.end(); ++it)
+ for ( const auto& a : allowedBiomes)
{
- Biome *a = *it;
if (biome == a)
{
return true;
@@ -129,8 +128,8 @@ bool RandomScatteredLargeFeature::isSwamphut(int cellX, int cellY, int cellZ)
return false;
}
StructurePiece *first = NULL;
- AUTO_VAR(it, structureAt->pieces.begin());
- if(it != structureAt->pieces.end() ) first = *it;
+ auto it = structureAt->pieces.begin();
+ if(it != structureAt->pieces.end() ) first = *it;
return dynamic_cast<ScatteredFeaturePieces::SwamplandHut *>(first) != NULL;
}