diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2014-02-04 21:06:56 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-03-08 18:05:28 (GMT) |
commit | 3742bb0d324b971f63cc7e557b1cb8a9d08c5cdd (patch) | |
tree | 0259dae54801daae0f5823e335cc6b608328623d /Source/cmake.cxx | |
parent | ec97ed7d0c67b635caf3ada65541b2eaf0818a93 (diff) | |
download | CMake-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/cmake.cxx')
-rw-r--r-- | Source/cmake.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 149e299..ad1d0fa 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -1202,7 +1202,7 @@ struct SaveCacheEntry cmCacheManager::CacheEntryType type; }; -int cmake::HandleDeleteCacheVariables(const char* var) +int cmake::HandleDeleteCacheVariables(const std::string& var) { std::vector<std::string> argsSplit; cmSystemTools::ExpandListArgument(std::string(var), argsSplit, true); @@ -1725,7 +1725,7 @@ int cmake::Generate() return 0; } -void cmake::AddCacheEntry(const char* key, const char* value, +void cmake::AddCacheEntry(const std::string& key, const char* value, const char* helpString, int type) { @@ -1734,7 +1734,7 @@ void cmake::AddCacheEntry(const char* key, const char* value, cmCacheManager::CacheEntryType(type)); } -const char* cmake::GetCacheDefinition(const char* name) const +const char* cmake::GetCacheDefinition(const std::string& name) const { return this->CacheManager->GetCacheValue(name); } @@ -2676,7 +2676,7 @@ int cmake::Build(const std::string& dir, nativeOptions); } -void cmake::WatchUnusedCli(const char* var) +void cmake::WatchUnusedCli(const std::string& var) { #ifdef CMAKE_BUILD_WITH_CMAKE this->VariableWatch->AddWatch(var, cmWarnUnusedCliWarning, this); @@ -2687,7 +2687,7 @@ void cmake::WatchUnusedCli(const char* var) #endif } -void cmake::UnwatchUnusedCli(const char* var) +void cmake::UnwatchUnusedCli(const std::string& var) { #ifdef CMAKE_BUILD_WITH_CMAKE this->VariableWatch->RemoveWatch(var, cmWarnUnusedCliWarning); |