From f4f906563fdf60c2de61df8ed02d51c5591c8639 Mon Sep 17 00:00:00 2001 From: Alexander Harkness Date: Sat, 16 Nov 2013 18:58:17 +0000 Subject: another --- source/Generating/ChunkDesc.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'source/Generating/ChunkDesc.cpp') diff --git a/source/Generating/ChunkDesc.cpp b/source/Generating/ChunkDesc.cpp index dc6c74a3c..4e2a85abe 100644 --- a/source/Generating/ChunkDesc.cpp +++ b/source/Generating/ChunkDesc.cpp @@ -270,7 +270,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) { @@ -313,7 +313,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__); @@ -370,7 +370,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) { @@ -397,7 +397,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++) @@ -428,7 +428,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++) @@ -464,7 +464,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++) @@ -505,7 +505,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++) -- cgit v1.2.3 From dbf2982e52b71e106923d4f36c6006fe68ca29e5 Mon Sep 17 00:00:00 2001 From: Alexander Harkness Date: Sat, 16 Nov 2013 18:58:38 +0000 Subject: And another... --- source/Generating/ChunkDesc.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/Generating/ChunkDesc.cpp') diff --git a/source/Generating/ChunkDesc.cpp b/source/Generating/ChunkDesc.cpp index 4e2a85abe..df7574c58 100644 --- a/source/Generating/ChunkDesc.cpp +++ b/source/Generating/ChunkDesc.cpp @@ -538,7 +538,7 @@ void cChunkDesc::AddBlockEntity(cBlockEntity * a_BlockEntity) 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); } -- cgit v1.2.3