From 5ca3a7c2e76bc91356aaa1c6bc3d12bb2a3c6e9c Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Mon, 8 Mar 2021 16:39:43 +0000 Subject: shared_ptr -> unique_ptr in generators --- src/Generating/DistortedHeightmap.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/Generating/DistortedHeightmap.cpp') diff --git a/src/Generating/DistortedHeightmap.cpp b/src/Generating/DistortedHeightmap.cpp index 11c873967..a0732287b 100644 --- a/src/Generating/DistortedHeightmap.cpp +++ b/src/Generating/DistortedHeightmap.cpp @@ -118,12 +118,12 @@ const cDistortedHeightmap::sGenParam cDistortedHeightmap::m_GenParam[256] = -cDistortedHeightmap::cDistortedHeightmap(int a_Seed, const cBiomeGenPtr & a_BiomeGen) : +cDistortedHeightmap::cDistortedHeightmap(int a_Seed, cBiomeGen & a_BiomeGen) : m_NoiseDistortX(a_Seed + 1000), m_NoiseDistortZ(a_Seed + 2000), m_CurChunkCoords(0x7fffffff, 0x7fffffff), // Set impossible coords for the chunk so that it's always considered stale m_BiomeGen(a_BiomeGen), - m_UnderlyingHeiGen(new cHeiGenBiomal(a_Seed, a_BiomeGen)), + m_UnderlyingHeiGen(a_Seed, a_BiomeGen), m_HeightGen(m_UnderlyingHeiGen, 64), m_IsInitialized(false) { @@ -297,7 +297,7 @@ void cDistortedHeightmap::UpdateDistortAmps(void) { for (int x = -1; x <= 1; x++) { - m_BiomeGen->GenBiomes({m_CurChunkCoords.m_ChunkX + x, m_CurChunkCoords.m_ChunkZ + z}, Biomes[x + 1][z + 1]); + m_BiomeGen.GenBiomes({m_CurChunkCoords.m_ChunkX + x, m_CurChunkCoords.m_ChunkZ + z}, Biomes[x + 1][z + 1]); } // for x } // for z -- cgit v1.2.3