diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-04-05 08:48:04 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-04-08 16:47:00 (GMT) |
commit | ba404938a202b51bb82bff8692ed08e53b061ad4 (patch) | |
tree | 445c969ae57dc9656e791af23b0b9f6830c6d255 /Source/cmOptionCommand.cxx | |
parent | f3922a9a5b463420db5f7fae08efdf1b4abdfe5e (diff) | |
download | CMake-ba404938a202b51bb82bff8692ed08e53b061ad4.zip CMake-ba404938a202b51bb82bff8692ed08e53b061ad4.tar.gz CMake-ba404938a202b51bb82bff8692ed08e53b061ad4.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/cmOptionCommand.cxx')
-rw-r--r-- | Source/cmOptionCommand.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Source/cmOptionCommand.cxx b/Source/cmOptionCommand.cxx index 60728ea..baf5b1e 100644 --- a/Source/cmOptionCommand.cxx +++ b/Source/cmOptionCommand.cxx @@ -42,16 +42,16 @@ bool cmOptionCommand std::string initialValue = "Off"; // Now check and see if the value has been stored in the cache // already, if so use that value and don't look for the program - cmCacheManager::CacheIterator it = - this->Makefile->GetCacheManager()->GetCacheIterator(args[0].c_str()); - if(!it.IsAtEnd()) + cmCacheManager* manager = this->Makefile->GetCacheManager(); + const char* existingValue = manager->GetCacheEntryValue(args[0]); + if(existingValue) { - if ( it.GetType() != cmCacheManager::UNINITIALIZED ) + if (manager->GetCacheEntryType(args[0]) != cmCacheManager::UNINITIALIZED) { - it.SetProperty("HELPSTRING", args[1].c_str()); + manager->SetCacheEntryProperty(args[0], "HELPSTRING", args[1]); return true; } - initialValue = it.GetValue(); + initialValue = existingValue; } if(args.size() == 3) { |