diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-04-05 08:48:04 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-04-06 15:58:55 (GMT) |
commit | 9410e24a4ad3a21b2c27d057798f723e88d14d45 (patch) | |
tree | 9259e248faee43f15b544e1fa7ee61f3ce23e0c4 /Source/cmFindBase.cxx | |
parent | 7b7ae3b1a1d1c664eeef48392759883aa4040657 (diff) | |
download | CMake-9410e24a4ad3a21b2c27d057798f723e88d14d45.zip CMake-9410e24a4ad3a21b2c27d057798f723e88d14d45.tar.gz CMake-9410e24a4ad3a21b2c27d057798f723e88d14d45.tar.bz2 |
cmCacheManager: Port consumers to non-iterator API.
This simplifies reasoning about the follow-up commit which ports
away from cmCacheManager to a class with the same method names.
Diffstat (limited to 'Source/cmFindBase.cxx')
-rw-r--r-- | Source/cmFindBase.cxx | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/Source/cmFindBase.cxx b/Source/cmFindBase.cxx index f63df61..cc08052 100644 --- a/Source/cmFindBase.cxx +++ b/Source/cmFindBase.cxx @@ -366,18 +366,18 @@ bool cmFindBase::CheckForVariableInCache() if(const char* cacheValue = this->Makefile->GetDefinition(this->VariableName)) { - cmCacheManager::CacheIterator it = - this->Makefile->GetCacheManager()-> - GetCacheIterator(this->VariableName.c_str()); + cmCacheManager* manager = this->Makefile->GetCacheManager(); + const char* cacheEntry = manager->GetCacheEntryValue(this->VariableName); bool found = !cmSystemTools::IsNOTFOUND(cacheValue); - bool cached = !it.IsAtEnd(); + bool cached = cacheEntry ? true : false; if(found) { // If the user specifies the entry on the command line without a // type we should add the type and docstring but keep the // original value. Tell the subclass implementations to do // this. - if(cached && it.GetType() == cmCacheManager::UNINITIALIZED) + if(cached && manager->GetCacheEntryType(this->VariableName) + == cmCacheManager::UNINITIALIZED) { this->AlreadyInCacheWithoutMetaInfo = true; } @@ -385,7 +385,8 @@ bool cmFindBase::CheckForVariableInCache() } else if(cached) { - const char* hs = it.GetProperty("HELPSTRING"); + const char* hs = manager->GetCacheEntryProperty(this->VariableName, + "HELPSTRING"); this->VariableDocumentation = hs?hs:"(none)"; } } |