cmCacheManager: Avoid cache entry self-assignment
Since commit bef93dc5
(Couple of changes: cache variables now have a map
of properties, 2002-09-11) the cmCacheManager::AddCacheDefinition method
accesses its map entry by reference. However, the commit left the
original entry assignment at the end of the method. With Apple Clang
5.1 and libc++ this self-assignment destroys the cache entry property
map.
Drop the self assignment. Also drop the condition around the call to
UnwatchUnusedCli since it was a self-comparison that must always have
been true.
This commit is contained in:
parent
326d15a329
commit
1cd3752729
|
@ -750,11 +750,7 @@ void cmCacheManager::AddCacheEntry(const char* key,
|
||||||
}
|
}
|
||||||
e.SetProperty("HELPSTRING", helpString? helpString :
|
e.SetProperty("HELPSTRING", helpString? helpString :
|
||||||
"(This variable does not exist and should not be used)");
|
"(This variable does not exist and should not be used)");
|
||||||
if (this->Cache[key].Value == e.Value)
|
|
||||||
{
|
|
||||||
this->CMakeInstance->UnwatchUnusedCli(key);
|
this->CMakeInstance->UnwatchUnusedCli(key);
|
||||||
}
|
|
||||||
this->Cache[key] = e;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool cmCacheManager::CacheIterator::IsAtEnd() const
|
bool cmCacheManager::CacheIterator::IsAtEnd() const
|
||||||
|
|
Loading…
Reference in New Issue