diff options
author | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-06-15 22:58:52 +0200 |
---|---|---|
committer | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-06-15 22:58:52 +0200 |
commit | a06b72c18dde43d8b242ed02261daa7c19c8b910 (patch) | |
tree | 8d8d91e4856c13119732cf578dc5862fede5556b /source/FastNBT.h | |
parent | Basic handling of vines. No growth yet. (diff) | |
download | cuberite-a06b72c18dde43d8b242ed02261daa7c19c8b910.tar cuberite-a06b72c18dde43d8b242ed02261daa7c19c8b910.tar.gz cuberite-a06b72c18dde43d8b242ed02261daa7c19c8b910.tar.bz2 cuberite-a06b72c18dde43d8b242ed02261daa7c19c8b910.tar.lz cuberite-a06b72c18dde43d8b242ed02261daa7c19c8b910.tar.xz cuberite-a06b72c18dde43d8b242ed02261daa7c19c8b910.tar.zst cuberite-a06b72c18dde43d8b242ed02261daa7c19c8b910.zip |
Diffstat (limited to 'source/FastNBT.h')
-rw-r--r-- | source/FastNBT.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/FastNBT.h b/source/FastNBT.h index ca801b36f..88d79f4c1 100644 --- a/source/FastNBT.h +++ b/source/FastNBT.h @@ -182,6 +182,14 @@ public: return NetworkToHostDouble8(m_Data + m_Tags[a_Tag].m_DataStart); } + inline AString GetString(int a_Tag) const + { + ASSERT(m_Tags[a_Tag].m_Type == TAG_String); + AString res; + res.assign(m_Data + m_Tags[a_Tag].m_DataStart, m_Tags[a_Tag].m_DataLength); + return res; + } + protected: const char * m_Data; int m_Length; |