summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorljfa-ag <ljfa-ag@web.de>2015-08-12 11:42:15 +0200
committerljfa-ag <ljfa-ag@web.de>2015-08-12 11:42:15 +0200
commit82a52081693135ec6b0294994db88b47f42e706b (patch)
tree60c2eccba34435f91d9f9aa5dda045f396e83fb1 /include
parent64ecc6fc635eaff48177dd58ede7b521a98f445d (diff)
downloadProject-Tick-82a52081693135ec6b0294994db88b47f42e706b.tar.gz
Project-Tick-82a52081693135ec6b0294994db88b47f42e706b.zip
Add typedef for map type used by tag_compound
Allows easy switch to unordered_map
Diffstat (limited to 'include')
-rw-r--r--include/tag_compound.h8
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>