summaryrefslogtreecommitdiffstats
path: root/src/WorldStorage/SchematicFileSerializer.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/WorldStorage/SchematicFileSerializer.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/WorldStorage/SchematicFileSerializer.cpp b/src/WorldStorage/SchematicFileSerializer.cpp
index 3e9ed5bef..6267668c5 100644
--- a/src/WorldStorage/SchematicFileSerializer.cpp
+++ b/src/WorldStorage/SchematicFileSerializer.cpp
@@ -271,13 +271,13 @@ bool cSchematicFileSerializer::LoadFromSchematicNBT(cBlockArea & a_BlockArea, cP
AString cSchematicFileSerializer::SaveToSchematicNBT(const cBlockArea & a_BlockArea)
{
cFastNBTWriter Writer("Schematic");
- Writer.AddShort("Width", a_BlockArea.m_Size.x);
- Writer.AddShort("Height", a_BlockArea.m_Size.y);
- Writer.AddShort("Length", a_BlockArea.m_Size.z);
+ Writer.AddShort("Width", static_cast<Int16>(a_BlockArea.m_Size.x));
+ Writer.AddShort("Height", static_cast<Int16>(a_BlockArea.m_Size.y));
+ Writer.AddShort("Length", static_cast<Int16>(a_BlockArea.m_Size.z));
Writer.AddString("Materials", "Alpha");
if (a_BlockArea.HasBlockTypes())
{
- Writer.AddByteArray("Blocks", (const char *)a_BlockArea.m_BlockTypes, a_BlockArea.GetBlockCount());
+ Writer.AddByteArray("Blocks", reinterpret_cast<const char *>(a_BlockArea.m_BlockTypes), a_BlockArea.GetBlockCount());
}
else
{
@@ -286,7 +286,7 @@ AString cSchematicFileSerializer::SaveToSchematicNBT(const cBlockArea & a_BlockA
}
if (a_BlockArea.HasBlockMetas())
{
- Writer.AddByteArray("Data", (const char *)a_BlockArea.m_BlockMetas, a_BlockArea.GetBlockCount());
+ Writer.AddByteArray("Data", reinterpret_cast<const char *>(a_BlockArea.m_BlockMetas), a_BlockArea.GetBlockCount());
}
else
{