NBT: Indexing operator for ArrayTag

This commit is contained in:
DankParrot 2020-08-12 19:59:56 -07:00
parent 35f91c17a1
commit 4569c1429d
1 changed files with 2 additions and 0 deletions

View File

@ -81,6 +81,8 @@ namespace NBT
const T* GetValue() const;
inline const T operator[](int32_t index) const { return GetValue()[index]; }
// Methods for range-based for loops
// TODO: check if this works for IntArrayTag and LongArrayTag
const T* begin() { return GetValue(); }