summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Generating/BioGen.cpp4
-rw-r--r--src/Generating/BioGen.h14
-rw-r--r--src/Generating/ComposableGenerator.cpp4
3 files changed, 13 insertions, 9 deletions
diff --git a/src/Generating/BioGen.cpp b/src/Generating/BioGen.cpp
index 175e4ef33..60ad4e3eb 100644
--- a/src/Generating/BioGen.cpp
+++ b/src/Generating/BioGen.cpp
@@ -227,7 +227,7 @@ cBioGenMulticache::cBioGenMulticache(cBiomeGen * a_BioGenToCache, size_t a_Cache
cBioGenMulticache::~cBioGenMulticache()
{
- for (std::vector<cBiomeGen*>::iterator it = m_Caches.begin(); it != m_Caches.end(); it++)
+ for (cBiomeGens::iterator it = m_Caches.begin(); it != m_Caches.end(); it++)
{
delete *it;
}
@@ -251,7 +251,7 @@ void cBioGenMulticache::GenBiomes(int a_ChunkX, int a_ChunkZ, cChunkDef::BiomeMa
void cBioGenMulticache::InitializeBiomeGen(cIniFile & a_IniFile)
{
- for (std::vector<cBiomeGen*>::iterator it = m_Caches.begin(); it != m_Caches.end(); it++)
+ for (cBiomeGens::iterator it = m_Caches.begin(); it != m_Caches.end(); it++)
{
cBiomeGen * tmp = *it;
tmp->InitializeBiomeGen(a_IniFile);
diff --git a/src/Generating/BioGen.h b/src/Generating/BioGen.h
index a4cf95a72..20d199611 100644
--- a/src/Generating/BioGen.h
+++ b/src/Generating/BioGen.h
@@ -87,16 +87,20 @@ class cBioGenMulticache :
typedef cBiomeGen super;
public:
- /*
- a_CacheSize defines the size of each singular cache
- a_CachesLength defines how many caches are used for the multicache
+ /*
+ a_CacheSize defines the size of each singular cache
+ a_CachesLength defines how many caches are used for the multicache
*/
cBioGenMulticache(cBiomeGen * a_BioGenToCache, size_t a_CacheSize, size_t a_CachesLength); // Doesn't take ownership of a_BioGenToCache
~cBioGenMulticache();
protected:
- size_t m_CachesLength;
- std::vector<cBiomeGen*> m_Caches;
+ typedef std::vector<cBiomeGen *> cBiomeGens;
+
+
+ size_t m_CachesLength;
+ cBiomeGens m_Caches;
+
virtual void GenBiomes(int a_ChunkX, int a_ChunkZ, cChunkDef::BiomeMap & a_BiomeMap) override;
virtual void InitializeBiomeGen(cIniFile & a_IniFile) override;
diff --git a/src/Generating/ComposableGenerator.cpp b/src/Generating/ComposableGenerator.cpp
index d70438bf3..d98153e22 100644
--- a/src/Generating/ComposableGenerator.cpp
+++ b/src/Generating/ComposableGenerator.cpp
@@ -243,12 +243,12 @@ void cComposableGenerator::InitBiomeGen(cIniFile & a_IniFile)
}
LOGD("Using a cache for biomegen of size %d.", CacheSize);
m_UnderlyingBiomeGen = m_BiomeGen;
- if (MultiCacheLength > 0)
+ if (MultiCacheLength > 0)
{
LOGD("Enabling multicache for biomegen of length %d.", MultiCacheLength);
m_BiomeGen = new cBioGenMulticache(m_UnderlyingBiomeGen, CacheSize, MultiCacheLength);
}
- else
+ else
{
m_BiomeGen = new cBioGenCache(m_UnderlyingBiomeGen, CacheSize);
}