summaryrefslogtreecommitdiffstats
path: root/Source/cmCacheManager.cxx
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2014-02-04 21:06:56 (GMT)
committerBrad King <brad.king@kitware.com>2014-03-08 18:05:28 (GMT)
commit3742bb0d324b971f63cc7e557b1cb8a9d08c5cdd (patch)
tree0259dae54801daae0f5823e335cc6b608328623d /Source/cmCacheManager.cxx
parentec97ed7d0c67b635caf3ada65541b2eaf0818a93 (diff)
downloadCMake-3742bb0d324b971f63cc7e557b1cb8a9d08c5cdd.zip
CMake-3742bb0d324b971f63cc7e557b1cb8a9d08c5cdd.tar.gz
CMake-3742bb0d324b971f63cc7e557b1cb8a9d08c5cdd.tar.bz2
stringapi: Use strings for variable names
Variable names are always generated by CMake and should never be NULL.
Diffstat (limited to 'Source/cmCacheManager.cxx')
-rw-r--r--Source/cmCacheManager.cxx11
1 files changed, 6 insertions, 5 deletions
diff --git a/Source/cmCacheManager.cxx b/Source/cmCacheManager.cxx
index 04542d8..7a71482 100644
--- a/Source/cmCacheManager.cxx
+++ b/Source/cmCacheManager.cxx
@@ -650,7 +650,7 @@ void cmCacheManager::OutputHelpString(std::ostream& fout,
}
}
-void cmCacheManager::RemoveCacheEntry(const char* key)
+void cmCacheManager::RemoveCacheEntry(const std::string& key)
{
CacheEntryMap::iterator i = this->Cache.find(key);
if(i != this->Cache.end())
@@ -660,7 +660,8 @@ void cmCacheManager::RemoveCacheEntry(const char* key)
}
-cmCacheManager::CacheEntry *cmCacheManager::GetCacheEntry(const char* key)
+cmCacheManager::CacheEntry *cmCacheManager::GetCacheEntry(
+ const std::string& key)
{
CacheEntryMap::iterator i = this->Cache.find(key);
if(i != this->Cache.end())
@@ -676,7 +677,7 @@ cmCacheManager::CacheIterator cmCacheManager::GetCacheIterator(
return CacheIterator(*this, key);
}
-const char* cmCacheManager::GetCacheValue(const char* key) const
+const char* cmCacheManager::GetCacheValue(const std::string& key) const
{
CacheEntryMap::const_iterator i = this->Cache.find(key);
if(i != this->Cache.end() &&
@@ -708,7 +709,7 @@ void cmCacheManager::PrintCache(std::ostream& out) const
}
-void cmCacheManager::AddCacheEntry(const char* key,
+void cmCacheManager::AddCacheEntry(const std::string& key,
const char* value,
const char* helpString,
CacheEntryType type)
@@ -767,7 +768,7 @@ void cmCacheManager::CacheIterator::Begin()
this->Position = this->Container.Cache.begin();
}
-bool cmCacheManager::CacheIterator::Find(const char* key)
+bool cmCacheManager::CacheIterator::Find(const std::string& key)
{
this->Position = this->Container.Cache.find(key);
return !this->IsAtEnd();