summaryrefslogtreecommitdiffstats
path: root/src/Generating/HeiGen.cpp
diff options
context:
space:
mode:
authorpeterbell10 <peterbell10@live.co.uk>2020-05-15 00:15:35 +0200
committerGitHub <noreply@github.com>2020-05-15 00:15:35 +0200
commit13144a08e496b89b34093ffd3d810d3442df3c44 (patch)
tree406d79e17b69560564fdb0972a3c50542a3a96c6 /src/Generating/HeiGen.cpp
parentGenerate "LuaState_Typedefs.inc" before running clang-tidy (diff)
downloadcuberite-13144a08e496b89b34093ffd3d810d3442df3c44.tar
cuberite-13144a08e496b89b34093ffd3d810d3442df3c44.tar.gz
cuberite-13144a08e496b89b34093ffd3d810d3442df3c44.tar.bz2
cuberite-13144a08e496b89b34093ffd3d810d3442df3c44.tar.lz
cuberite-13144a08e496b89b34093ffd3d810d3442df3c44.tar.xz
cuberite-13144a08e496b89b34093ffd3d810d3442df3c44.tar.zst
cuberite-13144a08e496b89b34093ffd3d810d3442df3c44.zip
Diffstat (limited to 'src/Generating/HeiGen.cpp')
-rw-r--r--src/Generating/HeiGen.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Generating/HeiGen.cpp b/src/Generating/HeiGen.cpp
index 515fdf4ba..e60f20a03 100644
--- a/src/Generating/HeiGen.cpp
+++ b/src/Generating/HeiGen.cpp
@@ -107,7 +107,7 @@ void cHeiGenFlat::InitializeHeightGen(cIniFile & a_IniFile)
// cHeiGenCache:
cHeiGenCache::cHeiGenCache(cTerrainHeightGenPtr a_HeiGenToCache, size_t a_CacheSize) :
- m_HeiGenToCache(a_HeiGenToCache),
+ m_HeiGenToCache(std::move(a_HeiGenToCache)),
m_CacheSize(a_CacheSize),
m_NumHits(0),
m_NumMisses(0),
@@ -219,7 +219,7 @@ bool cHeiGenCache::GetHeightAt(int a_ChunkX, int a_ChunkZ, int a_RelX, int a_Rel
////////////////////////////////////////////////////////////////////////////////
// cHeiGenMultiCache:
-cHeiGenMultiCache::cHeiGenMultiCache(cTerrainHeightGenPtr a_HeiGenToCache, size_t a_SubCacheSize, size_t a_NumSubCaches):
+cHeiGenMultiCache::cHeiGenMultiCache(const cTerrainHeightGenPtr & a_HeiGenToCache, size_t a_SubCacheSize, size_t a_NumSubCaches):
m_NumSubCaches(a_NumSubCaches)
{
// Create the individual sub-caches:
@@ -638,7 +638,7 @@ public:
cHeiGenMinMax(int a_Seed, cBiomeGenPtr a_BiomeGen):
m_Noise(a_Seed),
- m_BiomeGen(a_BiomeGen),
+ m_BiomeGen(std::move(a_BiomeGen)),
m_TotalWeight(0)
{
// Initialize the weights:
@@ -831,7 +831,7 @@ protected:
////////////////////////////////////////////////////////////////////////////////
// cTerrainHeightGen:
-cTerrainHeightGenPtr cTerrainHeightGen::CreateHeightGen(cIniFile & a_IniFile, cBiomeGenPtr a_BiomeGen, int a_Seed, bool & a_CacheOffByDefault)
+cTerrainHeightGenPtr cTerrainHeightGen::CreateHeightGen(cIniFile & a_IniFile, const cBiomeGenPtr & a_BiomeGen, int a_Seed, bool & a_CacheOffByDefault)
{
AString HeightGenName = a_IniFile.GetValueSet("Generator", "HeightGen", "");
if (HeightGenName.empty())