1
0

Fixed MCServer not compiling with C++03 compilers

This commit is contained in:
STRWarrior
2014-02-24 14:43:46 +01:00
parent 145b3492e7
commit 9440b61c8c
3 changed files with 12 additions and 12 deletions

View File

@@ -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.data(), Data.size());
a_Writer.AddByteArray("colors", (char *) &Data[0], Data.size());
a_Writer.EndCompound();
}
@@ -178,7 +178,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.data(), a_NBT.GetData(CurrLine), NumPixels);
memcpy(&m_Map->m_Data[0], a_NBT.GetData(CurrLine), NumPixels);
}
return true;