summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Generating/BioGen.cpp6
-rw-r--r--src/Generating/BioGen.h4
2 files changed, 5 insertions, 5 deletions
diff --git a/src/Generating/BioGen.cpp b/src/Generating/BioGen.cpp
index 698b9463b..de6869e12 100644
--- a/src/Generating/BioGen.cpp
+++ b/src/Generating/BioGen.cpp
@@ -216,7 +216,7 @@ m_CachesLength(a_CachesLength),
m_InternalCacheLength(a_CachesLength * a_CacheSize)
{
m_Caches.reserve(m_InternalCacheLength);
- for (int i = 0; i < m_InternalCacheLength; i++) {
+ for (size_t i = 0; i < m_InternalCacheLength; i++) {
m_Caches.push_back(new cBioGenCache(a_BioGenToCache, a_CacheSize));
}
}
@@ -239,8 +239,8 @@ cBioGenMulticache::~cBioGenMulticache()
void cBioGenMulticache::GenBiomes(int a_ChunkX, int a_ChunkZ, cChunkDef::BiomeMap & a_BiomeMap)
{
- int cacheIdx = ((unsigned int)a_ChunkX % m_CachesLength) * m_CachesLength
- + ((unsigned int)a_ChunkZ % m_CachesLength);
+ size_t cacheIdx = ((size_t)a_ChunkX % m_CachesLength) * m_CachesLength
+ + ((size_t)a_ChunkZ % m_CachesLength);
m_Caches[cacheIdx]->GenBiomes(a_ChunkX, a_ChunkZ, a_BiomeMap);
}
diff --git a/src/Generating/BioGen.h b/src/Generating/BioGen.h
index feb449c06..bf79d242d 100644
--- a/src/Generating/BioGen.h
+++ b/src/Generating/BioGen.h
@@ -91,8 +91,8 @@ public:
~cBioGenMulticache();
protected:
- int m_CachesLength;
- int m_InternalCacheLength;
+ size_t m_CachesLength;
+ size_t m_InternalCacheLength;
std::vector<cBiomeGen*> m_Caches;
virtual void GenBiomes(int a_ChunkX, int a_ChunkZ, cChunkDef::BiomeMap & a_BiomeMap) override;