From: Gunnar Beutner Date: Thu, 22 Oct 2015 16:30:47 +0000 (+0200) Subject: Use operator[] instead of insert() for Dictionary::Set X-Git-Tag: v2.4.0~152 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fd2cd7a3a50c25ee6b4796312c46e2c4474eeed1;p=icinga2 Use operator[] instead of insert() for Dictionary::Set refs #10428 --- diff --git a/lib/base/dictionary.cpp b/lib/base/dictionary.cpp index c4b9d2e45..9afb25681 100644 --- a/lib/base/dictionary.cpp +++ b/lib/base/dictionary.cpp @@ -78,10 +78,7 @@ void Dictionary::Set(const String& key, const Value& value) ASSERT(!OwnsLock()); ObjectLock olock(this); - std::pair::iterator, bool> ret; - ret = m_Data.insert(std::make_pair(key, value)); - if (!ret.second) - ret.first->second = value; + m_Data[key] = value; }