1
0

Fixed style.

This commit is contained in:
Mattes D 2014-09-05 22:07:13 +02:00
parent 6444bc25ba
commit 60e235362c
3 changed files with 13 additions and 9 deletions

View File

@ -227,7 +227,7 @@ cBioGenMulticache::cBioGenMulticache(cBiomeGen * a_BioGenToCache, size_t a_Cache
cBioGenMulticache::~cBioGenMulticache() 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; delete *it;
} }
@ -251,7 +251,7 @@ void cBioGenMulticache::GenBiomes(int a_ChunkX, int a_ChunkZ, cChunkDef::BiomeMa
void cBioGenMulticache::InitializeBiomeGen(cIniFile & a_IniFile) 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; cBiomeGen * tmp = *it;
tmp->InitializeBiomeGen(a_IniFile); tmp->InitializeBiomeGen(a_IniFile);

View File

@ -88,15 +88,19 @@ class cBioGenMulticache :
public: public:
/* /*
a_CacheSize defines the size of each singular cache a_CacheSize defines the size of each singular cache
a_CachesLength defines how many caches are used for the multicache 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(cBiomeGen * a_BioGenToCache, size_t a_CacheSize, size_t a_CachesLength); // Doesn't take ownership of a_BioGenToCache
~cBioGenMulticache(); ~cBioGenMulticache();
protected: protected:
size_t m_CachesLength; typedef std::vector<cBiomeGen *> cBiomeGens;
std::vector<cBiomeGen*> m_Caches;
size_t m_CachesLength;
cBiomeGens m_Caches;
virtual void GenBiomes(int a_ChunkX, int a_ChunkZ, cChunkDef::BiomeMap & a_BiomeMap) override; virtual void GenBiomes(int a_ChunkX, int a_ChunkZ, cChunkDef::BiomeMap & a_BiomeMap) override;
virtual void InitializeBiomeGen(cIniFile & a_IniFile) override; virtual void InitializeBiomeGen(cIniFile & a_IniFile) override;