diff options
author | tycho <work.tycho@gmail.com> | 2015-05-19 20:32:10 +0200 |
---|---|---|
committer | tycho <work.tycho@gmail.com> | 2015-05-19 20:32:10 +0200 |
commit | 77f1f58c0a7eb55001b375f1945690ed5c1e87a2 (patch) | |
tree | 99e4b53b2966bd4d9bf545d18ddb7edb89472830 /src/WorldStorage/MapSerializer.cpp | |
parent | Added LuaState support for all integral types (diff) | |
download | cuberite-77f1f58c0a7eb55001b375f1945690ed5c1e87a2.tar cuberite-77f1f58c0a7eb55001b375f1945690ed5c1e87a2.tar.gz cuberite-77f1f58c0a7eb55001b375f1945690ed5c1e87a2.tar.bz2 cuberite-77f1f58c0a7eb55001b375f1945690ed5c1e87a2.tar.lz cuberite-77f1f58c0a7eb55001b375f1945690ed5c1e87a2.tar.xz cuberite-77f1f58c0a7eb55001b375f1945690ed5c1e87a2.tar.zst cuberite-77f1f58c0a7eb55001b375f1945690ed5c1e87a2.zip |
Diffstat (limited to 'src/WorldStorage/MapSerializer.cpp')
-rw-r--r-- | src/WorldStorage/MapSerializer.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/WorldStorage/MapSerializer.cpp b/src/WorldStorage/MapSerializer.cpp index da7b9d929..d4925dcab 100644 --- a/src/WorldStorage/MapSerializer.cpp +++ b/src/WorldStorage/MapSerializer.cpp @@ -102,11 +102,11 @@ void cMapSerializer::SaveMapToNBT(cFastNBTWriter & a_Writer) { a_Writer.BeginCompound("data"); - a_Writer.AddByte("scale", m_Map->GetScale()); - a_Writer.AddByte("dimension", (int) m_Map->GetDimension()); + a_Writer.AddByte("scale", static_cast<Byte>(m_Map->GetScale())); + a_Writer.AddByte("dimension", static_cast<Byte>(m_Map->GetDimension())); - a_Writer.AddShort("width", m_Map->GetWidth()); - a_Writer.AddShort("height", m_Map->GetHeight()); + a_Writer.AddShort("width", static_cast<Int16>(m_Map->GetWidth())); + a_Writer.AddShort("height", static_cast<Int16>(m_Map->GetHeight())); a_Writer.AddInt("xCenter", m_Map->GetCenterX()); a_Writer.AddInt("zCenter", m_Map->GetCenterZ()); @@ -235,7 +235,7 @@ bool cIDCountSerializer::Load(void) int CurrLine = NBT.FindChildByName(0, "map"); if (CurrLine >= 0) { - m_MapCount = (int)NBT.GetShort(CurrLine) + 1; + m_MapCount = static_cast<unsigned int>(NBT.GetShort(CurrLine) + 1); } else { @@ -255,7 +255,7 @@ bool cIDCountSerializer::Save(void) if (m_MapCount > 0) { - Writer.AddShort("map", m_MapCount - 1); + Writer.AddShort("map", static_cast<Int16>(m_MapCount - 1)); } Writer.Finish(); |