From f2689c4887e6bd66af34de81cd793322f1dd57c4 Mon Sep 17 00:00:00 2001 From: tycho Date: Tue, 19 May 2015 11:50:59 +0100 Subject: Fixed a lot of warnings --- src/Generating/ChunkDesc.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/Generating/ChunkDesc.cpp') diff --git a/src/Generating/ChunkDesc.cpp b/src/Generating/ChunkDesc.cpp index 4a5ac5a18..fe5182004 100644 --- a/src/Generating/ChunkDesc.cpp +++ b/src/Generating/ChunkDesc.cpp @@ -134,7 +134,7 @@ EMCSBiome cChunkDesc::GetBiome(int a_RelX, int a_RelZ) -void cChunkDesc::SetHeight(int a_RelX, int a_RelZ, int a_Height) +void cChunkDesc::SetHeight(int a_RelX, int a_RelZ, HEIGHTTYPE a_Height) { cChunkDef::SetHeight(m_HeightMap, a_RelX, a_RelZ, a_Height); } @@ -143,7 +143,7 @@ void cChunkDesc::SetHeight(int a_RelX, int a_RelZ, int a_Height) -int cChunkDesc::GetHeight(int a_RelX, int a_RelZ) +HEIGHTTYPE cChunkDesc::GetHeight(int a_RelX, int a_RelZ) { return cChunkDef::GetHeight(m_HeightMap, a_RelX, a_RelZ); } @@ -158,7 +158,7 @@ void cChunkDesc::SetHeightFromShape(const Shape & a_Shape) { for (int x = 0; x < cChunkDef::Width; x++) { - for (int y = cChunkDef::Height - 1; y > 0; y--) + for (unsigned char y = cChunkDef::Height - 1; y > 0; y--) { if (a_Shape[y + x * 256 + z * 16 * 256] != 0) { @@ -612,8 +612,8 @@ void cChunkDesc::UpdateHeightmap(void) { for (int z = 0; z < cChunkDef::Width; z++) { - int Height = 0; - for (int y = cChunkDef::Height - 1; y > 0; y--) + HEIGHTTYPE Height = 0; + for (HEIGHTTYPE y = cChunkDef::Height - 1; y > 0; y--) { BLOCKTYPE BlockType = GetBlockType(x, y, z); if (BlockType != E_BLOCK_AIR) @@ -636,7 +636,7 @@ void cChunkDesc::CompressBlockMetas(cChunkDef::BlockNibbles & a_DestMetas) const NIBBLETYPE * AreaMetas = m_BlockArea.GetBlockMetas(); for (size_t i = 0; i < ARRAYCOUNT(a_DestMetas); i++) { - a_DestMetas[i] = AreaMetas[2 * i] | (AreaMetas[2 * i + 1] << 4); + a_DestMetas[i] = static_cast(AreaMetas[2 * i] | (AreaMetas[2 * i + 1] << 4)); } } -- cgit v1.2.3 From b2fa71a32ac8bd86bda778a5d54fe2e7e471a1c0 Mon Sep 17 00:00:00 2001 From: tycho Date: Thu, 28 May 2015 12:29:26 +0100 Subject: Fix comments --- src/Generating/ChunkDesc.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Generating/ChunkDesc.cpp') diff --git a/src/Generating/ChunkDesc.cpp b/src/Generating/ChunkDesc.cpp index fe5182004..07855b1d0 100644 --- a/src/Generating/ChunkDesc.cpp +++ b/src/Generating/ChunkDesc.cpp @@ -158,7 +158,7 @@ void cChunkDesc::SetHeightFromShape(const Shape & a_Shape) { for (int x = 0; x < cChunkDef::Width; x++) { - for (unsigned char y = cChunkDef::Height - 1; y > 0; y--) + for (HEIGHTTYPE y = cChunkDef::Height - 1; y > 0; y--) { if (a_Shape[y + x * 256 + z * 16 * 256] != 0) { -- cgit v1.2.3