NBT: Indexing operator for ArrayTag
This commit is contained in:
parent
35f91c17a1
commit
4569c1429d
|
@ -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(); }
|
||||
|
|
Loading…
Reference in New Issue