diff options
Diffstat (limited to 'Source/cmCacheManager.cxx')
-rw-r--r-- | Source/cmCacheManager.cxx | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/Source/cmCacheManager.cxx b/Source/cmCacheManager.cxx index d143193..bdd7303 100644 --- a/Source/cmCacheManager.cxx +++ b/Source/cmCacheManager.cxx @@ -71,8 +71,9 @@ bool cmCacheManager::LoadCache(const std::string& path, bool internal, while (*realbuffer != '0' && (*realbuffer == ' ' || *realbuffer == '\t' || *realbuffer == '\r' || *realbuffer == '\n')) { - if (*realbuffer == '\n') + if (*realbuffer == '\n') { lineno++; + } realbuffer++; } // skip blank lines and comment lines @@ -178,7 +179,7 @@ bool cmCacheManager::LoadCache(const std::string& path, bool internal, } const char* cmCacheManager::PersistentProperties[] = { "ADVANCED", "MODIFIED", - "STRINGS", 0 }; + "STRINGS", CM_NULLPTR }; bool cmCacheManager::ReadPropertyEntry(std::string const& entryKey, CacheEntry& e) @@ -446,7 +447,7 @@ cmCacheManager::CacheEntry* cmCacheManager::GetCacheEntry( if (i != this->Cache.end()) { return &i->second; } - return 0; + return CM_NULLPTR; } cmCacheManager::CacheIterator cmCacheManager::GetCacheIterator(const char* key) @@ -461,7 +462,7 @@ const char* cmCacheManager::GetInitializedCacheValue( if (i != this->Cache.end() && i->second.Initialized) { return i->second.Value.c_str(); } - return 0; + return CM_NULLPTR; } void cmCacheManager::PrintCache(std::ostream& out) const @@ -539,6 +540,11 @@ void cmCacheManager::CacheIterator::Next() } } +std::vector<std::string> cmCacheManager::CacheIterator::GetPropertyList() const +{ + return this->GetEntry().GetPropertyList(); +} + void cmCacheManager::CacheIterator::SetValue(const char* value) { if (this->IsAtEnd()) { @@ -558,6 +564,11 @@ bool cmCacheManager::CacheIterator::GetValueAsBool() const return cmSystemTools::IsOn(this->GetEntry().Value.c_str()); } +std::vector<std::string> cmCacheManager::CacheEntry::GetPropertyList() const +{ + return this->Properties.GetPropertyList(); +} + const char* cmCacheManager::CacheEntry::GetProperty( const std::string& prop) const { @@ -605,7 +616,7 @@ const char* cmCacheManager::CacheIterator::GetProperty( if (!this->IsAtEnd()) { return this->GetEntry().GetProperty(prop); } - return 0; + return CM_NULLPTR; } void cmCacheManager::CacheIterator::SetProperty(const std::string& p, @@ -642,5 +653,5 @@ void cmCacheManager::CacheIterator::SetProperty(const std::string& p, bool v) bool cmCacheManager::CacheIterator::PropertyExists( const std::string& prop) const { - return this->GetProperty(prop) ? true : false; + return this->GetProperty(prop) != CM_NULLPTR; } |