summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorljfa-ag <ljfa-ag@web.de>2015-07-07 17:52:33 +0200
committerljfa-ag <ljfa-ag@web.de>2015-07-07 17:52:33 +0200
commit00b3c2bc9cc638fe29d8e6f18454e9a48d0db714 (patch)
tree439dd18ada0c559f0febb61dcc8bd53f0c927b37 /src
parent780a63c33d80a961002859c13ce79d1ec1db9216 (diff)
downloadProject-Tick-00b3c2bc9cc638fe29d8e6f18454e9a48d0db714.tar.gz
Project-Tick-00b3c2bc9cc638fe29d8e6f18454e9a48d0db714.zip
Change return type of put and emplace to match std::map
Diffstat (limited to 'src')
-rw-r--r--src/tag_compound.cpp7
1 files changed, 3 insertions, 4 deletions
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<tag>&& t)
+std::pair<tag_compound::iterator, bool> tag_compound::put(const std::string& key, std::unique_ptr<tag>&& 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)));
}
}