summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/cmDefinitions.cxx11
1 files changed, 1 insertions, 10 deletions
diff --git a/Source/cmDefinitions.cxx b/Source/cmDefinitions.cxx
index 98becf8..6502163 100644
--- a/Source/cmDefinitions.cxx
+++ b/Source/cmDefinitions.cxx
@@ -50,16 +50,7 @@ cmDefinitions::SetInternal(const std::string& key, Def const& def)
if(this->Up || def.Exists)
{
// In lower scopes we store keys, defined or not.
- MapType::iterator i = this->Map.find(key);
- if(i == this->Map.end())
- {
- i = this->Map.insert(MapType::value_type(key, def)).first;
- }
- else
- {
- i->second = def;
- }
- return i->second;
+ return (this->Map[key] = def);
}
else
{