From fd2cd7a3a50c25ee6b4796312c46e2c4474eeed1 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Thu, 22 Oct 2015 18:30:47 +0200 Subject: [PATCH] Use operator[] instead of insert() for Dictionary::Set refs #10428 --- lib/base/dictionary.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) 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; } -- 2.40.0