summaryrefslogtreecommitdiffstats
path: root/src/WorldStorage/MapSerializer.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-10-21 14:20:06 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-10-21 14:20:06 +0200
commit5089f04cf67dfc3598ff8b714b452a66093625b0 (patch)
treed989589ba1f0dfca8d9e91e489e5e0e9176d0ed3 /src/WorldStorage/MapSerializer.cpp
parentEn masse NULL -> nullptr replace (diff)
downloadcuberite-5089f04cf67dfc3598ff8b714b452a66093625b0.tar
cuberite-5089f04cf67dfc3598ff8b714b452a66093625b0.tar.gz
cuberite-5089f04cf67dfc3598ff8b714b452a66093625b0.tar.bz2
cuberite-5089f04cf67dfc3598ff8b714b452a66093625b0.tar.lz
cuberite-5089f04cf67dfc3598ff8b714b452a66093625b0.tar.xz
cuberite-5089f04cf67dfc3598ff8b714b452a66093625b0.tar.zst
cuberite-5089f04cf67dfc3598ff8b714b452a66093625b0.zip
Diffstat (limited to 'src/WorldStorage/MapSerializer.cpp')
-rw-r--r--src/WorldStorage/MapSerializer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/WorldStorage/MapSerializer.cpp b/src/WorldStorage/MapSerializer.cpp
index 4a913c81a..f2d35b318 100644
--- a/src/WorldStorage/MapSerializer.cpp
+++ b/src/WorldStorage/MapSerializer.cpp
@@ -112,7 +112,7 @@ void cMapSerializer::SaveMapToNBT(cFastNBTWriter & a_Writer)
a_Writer.AddInt("zCenter", m_Map->GetCenterZ());
const cMap::cColorList & Data = m_Map->GetData();
- a_Writer.AddByteArray("colors", (char *) &Data[0], Data.size());
+ a_Writer.AddByteArray("colors", (char *)Data.data(), Data.size());
a_Writer.EndCompound();
}
@@ -190,7 +190,7 @@ bool cMapSerializer::LoadMapFromNBT(const cParsedNBT & a_NBT)
CurrLine = a_NBT.FindChildByName(Data, "colors");
if ((CurrLine >= 0) && (a_NBT.GetType(CurrLine) == TAG_ByteArray))
{
- memcpy(&m_Map->m_Data[0], a_NBT.GetData(CurrLine), NumPixels);
+ memcpy(m_Map->m_Data.data(), a_NBT.GetData(CurrLine), NumPixels);
}
return true;