From ea71042f79738bcdc08fe3bfa0a2f9cd1c0c03ac Mon Sep 17 00:00:00 2001 From: ljfa-ag Date: Thu, 9 Jul 2015 18:00:42 +0200 Subject: Change signature of put to take value --- src/tag_compound.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/tag_compound.cpp b/src/tag_compound.cpp index b0a36c30f4..4c6c03264e 100644 --- a/src/tag_compound.cpp +++ b/src/tag_compound.cpp @@ -43,17 +43,17 @@ value& tag_compound::operator[](const std::string& key) return tags[key]; } -std::pair tag_compound::put(const std::string& key, std::unique_ptr&& t) +std::pair tag_compound::put(const std::string& key, value&& val) { auto it = tags.find(key); if(it != tags.end()) { - it->second.set_ptr(std::move(t)); + it->second = std::move(val); return {it, false}; } else { - return tags.emplace(key, value(std::move(t))); + return tags.emplace(key, std::move(val)); } } -- cgit 0.0.5-2-1-g0f52