diff options
| author | ljfa-ag <ljfa-ag@web.de> | 2015-08-12 11:42:15 +0200 |
|---|---|---|
| committer | ljfa-ag <ljfa-ag@web.de> | 2015-08-12 11:42:15 +0200 |
| commit | 82a52081693135ec6b0294994db88b47f42e706b (patch) | |
| tree | 60c2eccba34435f91d9f9aa5dda045f396e83fb1 | |
| parent | 64ecc6fc635eaff48177dd58ede7b521a98f445d (diff) | |
| download | Project-Tick-82a52081693135ec6b0294994db88b47f42e706b.tar.gz Project-Tick-82a52081693135ec6b0294994db88b47f42e706b.zip | |
Add typedef for map type used by tag_compound
Allows easy switch to unordered_map
| -rw-r--r-- | include/tag_compound.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/include/tag_compound.h b/include/tag_compound.h index 60376d2446..7ec53e4f80 100644 --- a/include/tag_compound.h +++ b/include/tag_compound.h @@ -31,10 +31,12 @@ namespace nbt ///Tag that contains multiple unordered named tags of arbitrary types class tag_compound final : public detail::crtp_tag<tag_compound> { + typedef std::map<std::string, value> map_t_; + public: //Iterator types - typedef std::map<std::string, value>::iterator iterator; - typedef std::map<std::string, value>::const_iterator const_iterator; + typedef map_t_::iterator iterator; + typedef map_t_::const_iterator const_iterator; ///The type of the tag static constexpr tag_type type = tag_type::Compound; @@ -123,7 +125,7 @@ public: friend bool operator!=(const tag_compound& lhs, const tag_compound& rhs); private: - std::map<std::string, value> tags; + map_t_ tags; }; template<class T, class... Args> |
