diff options
author | Brad King <brad.king@kitware.com> | 2015-04-07 17:14:41 -0400 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-04-07 17:15:04 -0400 |
commit | 3347c5e4f9fcdd36c06067d6c7cd5a985a9c5d94 (patch) | |
tree | d0372265c5b1f07f9b1a8a6cc9bedf96bed2dbcb /Source/cmSetCommand.cxx | |
parent | 9410e24a4ad3a21b2c27d057798f723e88d14d45 (diff) | |
download | cmake-3347c5e4f9fcdd36c06067d6c7cd5a985a9c5d94.tar.gz |
Revert topic 'refactor-cache-api'
This topic was never tested without some follow-up commits. The
GetCacheEntryValue API returns a pointer to memory freed on return.
It will have to be revised along with the rest of the original topic.
Diffstat (limited to 'Source/cmSetCommand.cxx')
-rw-r--r-- | Source/cmSetCommand.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Source/cmSetCommand.cxx b/Source/cmSetCommand.cxx index e17474bd60..204d95b1e8 100644 --- a/Source/cmSetCommand.cxx +++ b/Source/cmSetCommand.cxx @@ -136,10 +136,9 @@ bool cmSetCommand } // see if this is already in the cache - cmCacheManager* manager = this->Makefile->GetCacheManager(); - const char* existingValue = manager->GetCacheEntryValue(variable); - if(existingValue && - (manager->GetCacheEntryType(variable) != cmCacheManager::UNINITIALIZED)) + cmCacheManager::CacheIterator it = + this->Makefile->GetCacheManager()->GetCacheIterator(variable); + if(!it.IsAtEnd() && (it.GetType() != cmCacheManager::UNINITIALIZED)) { // if the set is trying to CACHE the value but the value // is already in the cache and the type is not internal |