summaryrefslogtreecommitdiffstats
path: root/src/Generating/BioGen.cpp
diff options
context:
space:
mode:
authorDayBr3ak <benj.groeneveld@gmail.com>2014-09-02 18:13:24 +0200
committerDayBr3ak <benj.groeneveld@gmail.com>2014-09-02 18:13:24 +0200
commit82911f36629e77f3ec5a7a318de7151b4341ded2 (patch)
tree527a8a6f595ff0e9b2167df6fc42765c935885b0 /src/Generating/BioGen.cpp
parentfixing memory leak (diff)
downloadcuberite-82911f36629e77f3ec5a7a318de7151b4341ded2.tar
cuberite-82911f36629e77f3ec5a7a318de7151b4341ded2.tar.gz
cuberite-82911f36629e77f3ec5a7a318de7151b4341ded2.tar.bz2
cuberite-82911f36629e77f3ec5a7a318de7151b4341ded2.tar.lz
cuberite-82911f36629e77f3ec5a7a318de7151b4341ded2.tar.xz
cuberite-82911f36629e77f3ec5a7a318de7151b4341ded2.tar.zst
cuberite-82911f36629e77f3ec5a7a318de7151b4341ded2.zip
Diffstat (limited to '')
-rw-r--r--src/Generating/BioGen.cpp6
1 files changed, 3 insertions, 3 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);
}