From 00b3c2bc9cc638fe29d8e6f18454e9a48d0db714 Mon Sep 17 00:00:00 2001 From: ljfa-ag Date: Tue, 7 Jul 2015 17:52:33 +0200 Subject: Change return type of put and emplace to match std::map --- src/tag_compound.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/tag_compound.cpp b/src/tag_compound.cpp index a2b91826b6..b0a36c30f4 100644 --- a/src/tag_compound.cpp +++ b/src/tag_compound.cpp @@ -43,18 +43,17 @@ value& tag_compound::operator[](const std::string& key) return tags[key]; } -bool tag_compound::put(const std::string& key, std::unique_ptr&& t) +std::pair tag_compound::put(const std::string& key, std::unique_ptr&& t) { auto it = tags.find(key); if(it != tags.end()) { it->second.set_ptr(std::move(t)); - return false; + return {it, false}; } else { - tags.emplace(key, value(std::move(t))); - return true; + return tags.emplace(key, value(std::move(t))); } } -- cgit 0.0.5-2-1-g0f52