summaryrefslogtreecommitdiffstats
path: root/src/WorldStorage/FireworksSerializer.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-05-10 21:27:57 +0200
committerMattes D <github@xoft.cz>2014-05-10 21:27:57 +0200
commit28815252e6ff086c0fab7cf56be4839f3d8612a3 (patch)
tree4532e85cbcc873a2616147713e9f899ecf84d111 /src/WorldStorage/FireworksSerializer.cpp
parentClient cert is not requested. (diff)
parentMerge pull request #993 from mc-server/GridStructGen (diff)
downloadcuberite-28815252e6ff086c0fab7cf56be4839f3d8612a3.tar
cuberite-28815252e6ff086c0fab7cf56be4839f3d8612a3.tar.gz
cuberite-28815252e6ff086c0fab7cf56be4839f3d8612a3.tar.bz2
cuberite-28815252e6ff086c0fab7cf56be4839f3d8612a3.tar.lz
cuberite-28815252e6ff086c0fab7cf56be4839f3d8612a3.tar.xz
cuberite-28815252e6ff086c0fab7cf56be4839f3d8612a3.tar.zst
cuberite-28815252e6ff086c0fab7cf56be4839f3d8612a3.zip
Diffstat (limited to 'src/WorldStorage/FireworksSerializer.cpp')
-rw-r--r--src/WorldStorage/FireworksSerializer.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/WorldStorage/FireworksSerializer.cpp b/src/WorldStorage/FireworksSerializer.cpp
index e0cd69634..181cfde0d 100644
--- a/src/WorldStorage/FireworksSerializer.cpp
+++ b/src/WorldStorage/FireworksSerializer.cpp
@@ -96,7 +96,7 @@ void cFireworkItem::ParseFromNBT(cFireworkItem & a_FireworkItem, const cParsedNB
if (ExplosionName == "Colors")
{
// Divide by four as data length returned in bytes
- int DataLength = a_NBT.GetDataLength(explosiontag);
+ size_t DataLength = a_NBT.GetDataLength(explosiontag);
// round to the next highest multiple of four
DataLength -= DataLength % 4;
if (DataLength == 0)
@@ -105,14 +105,14 @@ void cFireworkItem::ParseFromNBT(cFireworkItem & a_FireworkItem, const cParsedNB
}
const char * ColourData = (a_NBT.GetData(explosiontag));
- for (int i = 0; i < DataLength; i += 4 /* Size of network int*/)
+ for (size_t i = 0; i < DataLength; i += 4)
{
a_FireworkItem.m_Colours.push_back(GetBEInt(ColourData + i));
}
}
else if (ExplosionName == "FadeColors")
{
- int DataLength = a_NBT.GetDataLength(explosiontag) / 4;
+ size_t DataLength = a_NBT.GetDataLength(explosiontag) / 4;
// round to the next highest multiple of four
DataLength -= DataLength % 4;
if (DataLength == 0)
@@ -121,7 +121,7 @@ void cFireworkItem::ParseFromNBT(cFireworkItem & a_FireworkItem, const cParsedNB
}
const char * FadeColourData = (a_NBT.GetData(explosiontag));
- for (int i = 0; i < DataLength; i += 4 /* Size of network int*/)
+ for (size_t i = 0; i < DataLength; i += 4)
{
a_FireworkItem.m_FadeColours.push_back(GetBEInt(FadeColourData + i));
}