From f1f783877f0f8338a225244faff4e40efe10a4ce Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Sat, 21 Jul 2018 18:07:45 +0200 Subject: NBT: rework type system --- src/NBT/StringTag.hpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/NBT/StringTag.hpp') diff --git a/src/NBT/StringTag.hpp b/src/NBT/StringTag.hpp index 2fda6d3..8672b73 100644 --- a/src/NBT/StringTag.hpp +++ b/src/NBT/StringTag.hpp @@ -38,13 +38,16 @@ private: const uint8_t *ptr; public: + static const MakeType Type; + + StringTag(Buffer *buffer) { len = buffer->get16(); ptr = buffer->get(len); } - virtual Type getType() const { - return Type::String; + virtual const TagType & getType() const { + return Type; } virtual void print(std::ostream& os, const std::string &) const { -- cgit v1.2.3