summaryrefslogtreecommitdiffstats
path: root/src/WorldStorage/MapSerializer.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-12-13 13:11:01 +0100
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-12-13 13:11:01 +0100
commit4b20a615192baeb5ef0a04a10161a03428cda8cd (patch)
treec6f25102267b0cc4a444f6e746679405948142b0 /src/WorldStorage/MapSerializer.cpp
parentFixed compilation? (diff)
parentMerge pull request #1660 from Seadragon91/master (diff)
downloadcuberite-4b20a615192baeb5ef0a04a10161a03428cda8cd.tar
cuberite-4b20a615192baeb5ef0a04a10161a03428cda8cd.tar.gz
cuberite-4b20a615192baeb5ef0a04a10161a03428cda8cd.tar.bz2
cuberite-4b20a615192baeb5ef0a04a10161a03428cda8cd.tar.lz
cuberite-4b20a615192baeb5ef0a04a10161a03428cda8cd.tar.xz
cuberite-4b20a615192baeb5ef0a04a10161a03428cda8cd.tar.zst
cuberite-4b20a615192baeb5ef0a04a10161a03428cda8cd.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;