From 956142385f63cec0ac1033568ba216cdf3a4a20f Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Sat, 21 Jul 2018 11:08:27 +0200 Subject: NBT: add data accessors for IntArray and LongArray --- src/NBT/IntArrayTag.hpp | 8 ++++++++ src/NBT/LongArrayTag.hpp | 8 ++++++++ 2 files changed, 16 insertions(+) (limited to 'src/NBT') diff --git a/src/NBT/IntArrayTag.hpp b/src/NBT/IntArrayTag.hpp index 5fdd3fc..1b40a1d 100644 --- a/src/NBT/IntArrayTag.hpp +++ b/src/NBT/IntArrayTag.hpp @@ -68,6 +68,14 @@ public: os << indent << "]"; } + + uint32_t getLength() const { + return len; + } + + const uint8_t * getPointer() const { + return ptr; + } }; } diff --git a/src/NBT/LongArrayTag.hpp b/src/NBT/LongArrayTag.hpp index 6cd910f..a526b72 100644 --- a/src/NBT/LongArrayTag.hpp +++ b/src/NBT/LongArrayTag.hpp @@ -68,6 +68,14 @@ public: os << indent << "]"; } + + uint32_t getLength() const { + return len; + } + + const uint8_t * getPointer() const { + return ptr; + } }; } -- cgit v1.2.3