summaryrefslogtreecommitdiffstats
path: root/src/Generating/ChunkDesc.cpp
diff options
context:
space:
mode:
authorAlexander Harkness <bearbin@gmail.com>2013-11-24 15:37:03 +0100
committerAlexander Harkness <bearbin@gmail.com>2013-11-24 15:37:03 +0100
commitc3cd436ec3526962f0f0698ab2d75774247c340b (patch)
treeaf5fa89e891ede194f981399af8b830afc6dec97 /src/Generating/ChunkDesc.cpp
parentRemoved pedantic build and added optimisation to debug builds. (diff)
parentRCONClient: Initial implementation. (diff)
downloadcuberite-c3cd436ec3526962f0f0698ab2d75774247c340b.tar
cuberite-c3cd436ec3526962f0f0698ab2d75774247c340b.tar.gz
cuberite-c3cd436ec3526962f0f0698ab2d75774247c340b.tar.bz2
cuberite-c3cd436ec3526962f0f0698ab2d75774247c340b.tar.lz
cuberite-c3cd436ec3526962f0f0698ab2d75774247c340b.tar.xz
cuberite-c3cd436ec3526962f0f0698ab2d75774247c340b.tar.zst
cuberite-c3cd436ec3526962f0f0698ab2d75774247c340b.zip
Diffstat (limited to 'src/Generating/ChunkDesc.cpp')
-rw-r--r--src/Generating/ChunkDesc.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/Generating/ChunkDesc.cpp b/src/Generating/ChunkDesc.cpp
index 9fb306996..6050430fd 100644
--- a/src/Generating/ChunkDesc.cpp
+++ b/src/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);
}