1
0
mirror of https://github.com/Icinga/icinga2.git synced 2025-04-08 17:05:25 +02:00

Use operator[] instead of insert() for Dictionary::Set

refs 
This commit is contained in:
Gunnar Beutner 2015-10-22 18:30:47 +02:00
parent df2d7c5bf8
commit fd2cd7a3a5

@ -78,10 +78,7 @@ void Dictionary::Set(const String& key, const Value& value)
ASSERT(!OwnsLock());
ObjectLock olock(this);
std::pair<std::map<String, Value>::iterator, bool> ret;
ret = m_Data.insert(std::make_pair(key, value));
if (!ret.second)
ret.first->second = value;
m_Data[key] = value;
}