summaryrefslogtreecommitdiffstats
path: root/source/Generating/ChunkDesc.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2013-11-17 23:26:53 +0100
committerMattes D <github@xoft.cz>2013-11-17 23:26:53 +0100
commit5277360098a4e7818f6fbaa0e0ead3f0dce7adac (patch)
tree9d087dab5c1c6e04ce76b801519356557b9086f9 /source/Generating/ChunkDesc.cpp
parentMerge pull request #353 from marmot21/playerxp (diff)
parentAnd another... (diff)
downloadcuberite-5277360098a4e7818f6fbaa0e0ead3f0dce7adac.tar
cuberite-5277360098a4e7818f6fbaa0e0ead3f0dce7adac.tar.gz
cuberite-5277360098a4e7818f6fbaa0e0ead3f0dce7adac.tar.bz2
cuberite-5277360098a4e7818f6fbaa0e0ead3f0dce7adac.tar.lz
cuberite-5277360098a4e7818f6fbaa0e0ead3f0dce7adac.tar.xz
cuberite-5277360098a4e7818f6fbaa0e0ead3f0dce7adac.tar.zst
cuberite-5277360098a4e7818f6fbaa0e0ead3f0dce7adac.zip
Diffstat (limited to 'source/Generating/ChunkDesc.cpp')
-rw-r--r--source/Generating/ChunkDesc.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/source/Generating/ChunkDesc.cpp b/source/Generating/ChunkDesc.cpp
index 9fb306996..6050430fd 100644
--- a/source/Generating/ChunkDesc.cpp
+++ b/source/Generating/ChunkDesc.cpp
@@ -271,7 +271,7 @@ void cChunkDesc::ReadBlockArea(cBlockArea & a_Dest, int a_MinRelX, int a_MaxRelX
a_MaxRelX += 1;
a_MaxRelY += 1;
a_MaxRelZ += 1;
-
+
// Check coords validity:
if (a_MinRelX < 0)
{
@@ -314,7 +314,7 @@ void cChunkDesc::ReadBlockArea(cBlockArea & a_Dest, int a_MinRelX, int a_MaxRelX
LOGWARNING("%s: MaxRelY more than chunk height, adjusting to chunk height", __FUNCTION__);
a_MaxRelY = cChunkDef::Height - 1;
}
-
+
if (a_MinRelZ < 0)
{
LOGWARNING("%s: MinRelZ less than zero, adjusting to zero", __FUNCTION__);
@@ -371,7 +371,7 @@ void cChunkDesc::ReadBlockArea(cBlockArea & a_Dest, int a_MinRelX, int a_MaxRelX
HEIGHTTYPE cChunkDesc::GetMaxHeight(void) const
{
HEIGHTTYPE MaxHeight = m_HeightMap[0];
- for (int i = 1; i < ARRAYCOUNT(m_HeightMap); i++)
+ for (unsigned int i = 1; i < ARRAYCOUNT(m_HeightMap); i++)
{
if (m_HeightMap[i] > MaxHeight)
{
@@ -398,7 +398,7 @@ void cChunkDesc::FillRelCuboid(
int MaxX = std::min(a_MaxX, cChunkDef::Width - 1);
int MaxY = std::min(a_MaxY, cChunkDef::Height - 1);
int MaxZ = std::min(a_MaxZ, cChunkDef::Width - 1);
-
+
for (int y = MinY; y <= MaxY; y++)
{
for (int z = MinZ; z <= MaxZ; z++)
@@ -429,7 +429,7 @@ void cChunkDesc::ReplaceRelCuboid(
int MaxX = std::min(a_MaxX, cChunkDef::Width - 1);
int MaxY = std::min(a_MaxY, cChunkDef::Height - 1);
int MaxZ = std::min(a_MaxZ, cChunkDef::Width - 1);
-
+
for (int y = MinY; y <= MaxY; y++)
{
for (int z = MinZ; z <= MaxZ; z++)
@@ -465,7 +465,7 @@ void cChunkDesc::FloorRelCuboid(
int MaxX = std::min(a_MaxX, cChunkDef::Width - 1);
int MaxY = std::min(a_MaxY, cChunkDef::Height - 1);
int MaxZ = std::min(a_MaxZ, cChunkDef::Width - 1);
-
+
for (int y = MinY; y <= MaxY; y++)
{
for (int z = MinZ; z <= MaxZ; z++)
@@ -506,7 +506,7 @@ void cChunkDesc::RandomFillRelCuboid(
int MaxX = std::min(a_MaxX, cChunkDef::Width - 1);
int MaxY = std::min(a_MaxY, cChunkDef::Height - 1);
int MaxZ = std::min(a_MaxZ, cChunkDef::Width - 1);
-
+
for (int y = MinY; y <= MaxY; y++)
{
for (int z = MinZ; z <= MaxZ; z++)
@@ -565,7 +565,7 @@ cBlockEntity * cChunkDesc::GetBlockEntity(int a_RelX, int a_RelY, int a_RelZ)
void cChunkDesc::CompressBlockMetas(cChunkDef::BlockNibbles & a_DestMetas)
{
const NIBBLETYPE * AreaMetas = m_BlockArea.GetBlockMetas();
- for (int i = 0; i < ARRAYCOUNT(a_DestMetas); i++)
+ for (unsigned int i = 0; i < ARRAYCOUNT(a_DestMetas); i++)
{
a_DestMetas[i] = AreaMetas[2 * i] | (AreaMetas[2 * i + 1] << 4);
}