From 180a43d09721a32ad502f5e583d3b2d797501c00 Mon Sep 17 00:00:00 2001 From: Mattes D Date: Fri, 27 Sep 2019 17:51:44 +0200 Subject: Fixed MSVC warnings (#4400) --- src/BlockArea.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/BlockArea.cpp') diff --git a/src/BlockArea.cpp b/src/BlockArea.cpp index a870a7624..10ad8f068 100644 --- a/src/BlockArea.cpp +++ b/src/BlockArea.cpp @@ -1633,7 +1633,7 @@ void cBlockArea::SetRelBlockType(int a_RelX, int a_RelY, int a_RelZ, BLOCKTYPE a // Update the block entities, if appropriate: if (HasBlockEntities()) { - auto itr = m_BlockEntities->find(static_cast(idx)); + auto itr = m_BlockEntities->find(idx); if (itr != m_BlockEntities->end()) { if (itr->second->GetBlockType() == a_BlockType) @@ -1827,7 +1827,7 @@ void cBlockArea::SetRelBlockTypeMeta(int a_RelX, int a_RelY, int a_RelZ, B // Update the block entities, if appropriate: if (HasBlockEntities()) { - auto itr = m_BlockEntities->find(static_cast(idx)); + auto itr = m_BlockEntities->find(idx); if (itr != m_BlockEntities->end()) { if (itr->second->GetBlockType() == a_BlockType) @@ -2173,7 +2173,7 @@ bool cBlockArea::DoWithBlockEntityRelAt(int a_RelX, int a_RelY, int a_RelZ, cBlo { return false; } - auto idx = static_cast(MakeIndex(a_RelX, a_RelY, a_RelZ)); + auto idx = MakeIndex(a_RelX, a_RelY, a_RelZ); auto itr = m_BlockEntities->find(idx); if (itr == m_BlockEntities->end()) { @@ -2400,7 +2400,7 @@ void cBlockArea::RelSetData( // Update the block entities, if appropriate: if (HasBlockEntities()) { - auto itr = m_BlockEntities->find(static_cast(Index)); + auto itr = m_BlockEntities->find(Index); if (itr != m_BlockEntities->end()) { if (itr->second->GetBlockType() == a_BlockType) @@ -2617,7 +2617,7 @@ void cBlockArea::MergeBlockEntities(int a_RelX, int a_RelY, int a_RelZ, const cB } // This block should have a block entity, check that there is one: - auto itr = m_BlockEntities->find(static_cast(idx)); + auto itr = m_BlockEntities->find(idx); if (itr != m_BlockEntities->end()) { // There is one already @@ -2631,7 +2631,7 @@ void cBlockArea::MergeBlockEntities(int a_RelX, int a_RelY, int a_RelZ, const cB if (a_Src.IsValidRelCoords(srcX, srcY, srcZ)) { auto srcIdx = a_Src.MakeIndex(srcX, srcY, srcZ); - auto itrSrc = a_Src.m_BlockEntities->find(static_cast(srcIdx)); + auto itrSrc = a_Src.m_BlockEntities->find(srcIdx); if (itrSrc != a_Src.m_BlockEntities->end()) { m_BlockEntities->insert({idx, itrSrc->second->Clone(x, y, z)}); @@ -2669,7 +2669,7 @@ void cBlockArea::RescanBlockEntities(void) continue; } // This block should have a block entity, check that there is one: - auto itr = m_BlockEntities->find(static_cast(idx)); + auto itr = m_BlockEntities->find(idx); if (itr != m_BlockEntities->end()) { continue; -- cgit v1.2.3