summaryrefslogtreecommitdiffstats
path: root/src/BlockArea.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/BlockArea.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/BlockArea.cpp b/src/BlockArea.cpp
index 89cf18d4a..7982afc31 100644
--- a/src/BlockArea.cpp
+++ b/src/BlockArea.cpp
@@ -60,7 +60,7 @@ void InternalMergeBlocks(
else
{
NIBBLETYPE FakeDestMeta = 0;
- Combinator(a_DstTypes[DstIdx], a_SrcTypes[SrcIdx], FakeDestMeta, (NIBBLETYPE)0);
+ Combinator(a_DstTypes[DstIdx], a_SrcTypes[SrcIdx], FakeDestMeta, static_cast<NIBBLETYPE>(0));
}
++DstIdx;
++SrcIdx;
@@ -620,7 +620,7 @@ void cBlockArea::DumpToRawFile(const AString & a_FileName)
f.Write(&SizeX, 4);
f.Write(&SizeY, 4);
f.Write(&SizeZ, 4);
- unsigned char DataTypes = (unsigned char)GetDataTypes();
+ unsigned char DataTypes = static_cast<unsigned char>(GetDataTypes());
f.Write(&DataTypes, 1);
size_t NumBlocks = GetBlockCount();
if (HasBlockTypes())
@@ -2157,7 +2157,7 @@ void cBlockArea::ExpandBlockTypes(int a_SubMinX, int a_AddMaxX, int a_SubMinY, i
int NewSizeX = m_Size.x + a_SubMinX + a_AddMaxX;
int NewSizeY = m_Size.y + a_SubMinY + a_AddMaxY;
int NewSizeZ = m_Size.z + a_SubMinZ + a_AddMaxZ;
- size_t BlockCount = (size_t)(NewSizeX * NewSizeY * NewSizeZ);
+ size_t BlockCount = static_cast<size_t>(NewSizeX * NewSizeY * NewSizeZ);
BLOCKTYPE * NewBlockTypes = new BLOCKTYPE[BlockCount];
memset(NewBlockTypes, 0, BlockCount * sizeof(BLOCKTYPE));
int OldIndex = 0;
@@ -2187,7 +2187,7 @@ void cBlockArea::ExpandNibbles(NIBBLEARRAY & a_Array, int a_SubMinX, int a_AddMa
int NewSizeX = m_Size.x + a_SubMinX + a_AddMaxX;
int NewSizeY = m_Size.y + a_SubMinY + a_AddMaxY;
int NewSizeZ = m_Size.z + a_SubMinZ + a_AddMaxZ;
- size_t BlockCount = (size_t)(NewSizeX * NewSizeY * NewSizeZ);
+ size_t BlockCount = static_cast<size_t>(NewSizeX * NewSizeY * NewSizeZ);
NIBBLETYPE * NewNibbles = new NIBBLETYPE[BlockCount];
memset(NewNibbles, 0, BlockCount * sizeof(NIBBLETYPE));
int OldIndex = 0;