mirror of
https://github.com/neocturne/MinedMap.git
synced 2025-04-19 11:05:08 +02:00
NBT: String: add data accessor
This commit is contained in:
parent
59e0ce1f0c
commit
a85fd8bcf4
1 changed files with 5 additions and 1 deletions
|
@ -50,8 +50,12 @@ public:
|
|||
return Type;
|
||||
}
|
||||
|
||||
std::string getValue() const {
|
||||
return std::string(reinterpret_cast<const char *>(ptr), len);
|
||||
}
|
||||
|
||||
virtual void print(std::ostream& os, const std::string &) const {
|
||||
os << "\"" << std::string(reinterpret_cast<const char *>(ptr), len) << "\"";
|
||||
os << "\"" << getValue() << "\"";
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue