summaryrefslogtreecommitdiffstats
path: root/src/WorldStorage/FastNBT.h
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-05-09 20:59:59 +0200
committerMattes D <github@xoft.cz>2014-05-09 20:59:59 +0200
commit839cff62ad34fd4203e7920b491419ced8f0ddbd (patch)
tree3557874b60f1a0ae440651459aefdbfb6e56ce2b /src/WorldStorage/FastNBT.h
parentRemoved unused constants from MineShafts and Ravines. (diff)
parentFixed size_t in FireworksSerializer. (diff)
downloadcuberite-839cff62ad34fd4203e7920b491419ced8f0ddbd.tar
cuberite-839cff62ad34fd4203e7920b491419ced8f0ddbd.tar.gz
cuberite-839cff62ad34fd4203e7920b491419ced8f0ddbd.tar.bz2
cuberite-839cff62ad34fd4203e7920b491419ced8f0ddbd.tar.lz
cuberite-839cff62ad34fd4203e7920b491419ced8f0ddbd.tar.xz
cuberite-839cff62ad34fd4203e7920b491419ced8f0ddbd.tar.zst
cuberite-839cff62ad34fd4203e7920b491419ced8f0ddbd.zip
Diffstat (limited to 'src/WorldStorage/FastNBT.h')
-rw-r--r--src/WorldStorage/FastNBT.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/WorldStorage/FastNBT.h b/src/WorldStorage/FastNBT.h
index 7b0af4927..fe28005ac 100644
--- a/src/WorldStorage/FastNBT.h
+++ b/src/WorldStorage/FastNBT.h
@@ -61,10 +61,10 @@ public:
// The following members are indices into the data stream. m_DataLength == 0 if no data available
// They must not be pointers, because the datastream may be copied into another AString object in the meantime.
- int m_NameStart;
- int m_NameLength;
- int m_DataStart;
- int m_DataLength;
+ size_t m_NameStart;
+ size_t m_NameLength;
+ size_t m_DataStart;
+ size_t m_DataLength;
// The following members are indices into the array returned; -1 if not valid
// They must not be pointers, because pointers would not survive std::vector reallocation
@@ -135,7 +135,7 @@ public:
/** Returns the length of the tag's data, in bytes.
Not valid for Compound or List tags! */
- int GetDataLength (int a_Tag) const
+ size_t GetDataLength (int a_Tag) const
{
ASSERT(m_Tags[(size_t)a_Tag].m_Type != TAG_List);
ASSERT(m_Tags[(size_t)a_Tag].m_Type != TAG_Compound);
@@ -256,10 +256,10 @@ protected:
bool m_IsValid; // True if parsing succeeded
// Used while parsing:
- int m_Pos;
+ size_t m_Pos;
bool Parse(void);
- bool ReadString(int & a_StringStart, int & a_StringLen); // Reads a simple string (2 bytes length + data), sets the string descriptors
+ bool ReadString(size_t & a_StringStart, size_t & a_StringLen); // Reads a simple string (2 bytes length + data), sets the string descriptors
bool ReadCompound(void); // Reads the latest tag as a compound
bool ReadList(eTagType a_ChildrenType); // Reads the latest tag as a list of items of type a_ChildrenType
bool ReadTag(void); // Reads the latest tag, depending on its m_Type setting