From 36c1393a5682a7cab500d3f0ca2cb45ddb0a844f Mon Sep 17 00:00:00 2001 From: ljfa-ag Date: Fri, 3 Jul 2015 19:38:52 +0200 Subject: Create value_initializer --- src/tag_compound.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') diff --git a/src/tag_compound.cpp b/src/tag_compound.cpp index 94dc2dd6f1..f26044ce20 100644 --- a/src/tag_compound.cpp +++ b/src/tag_compound.cpp @@ -22,6 +22,12 @@ namespace nbt { +tag_compound::tag_compound(std::initializer_list> init) +{ + for(auto& pair: init) + tags.emplace(pair); +} + value& tag_compound::at(const std::string& key) { return tags.at(key); -- cgit 0.0.5-2-1-g0f52