diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2014-02-04 16:06:56 -0500 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-03-08 13:05:28 -0500 |
commit | 3742bb0d324b971f63cc7e557b1cb8a9d08c5cdd (patch) | |
tree | 0259dae54801daae0f5823e335cc6b608328623d /Source/cmFindBase.cxx | |
parent | ec97ed7d0c67b635caf3ada65541b2eaf0818a93 (diff) | |
download | cmake-3742bb0d324b971f63cc7e557b1cb8a9d08c5cdd.tar.gz |
stringapi: Use strings for variable names
Variable names are always generated by CMake and should never be NULL.
Diffstat (limited to 'Source/cmFindBase.cxx')
-rw-r--r-- | Source/cmFindBase.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/cmFindBase.cxx b/Source/cmFindBase.cxx index ae15ee7245..86fd54b076 100644 --- a/Source/cmFindBase.cxx +++ b/Source/cmFindBase.cxx @@ -268,7 +268,7 @@ void cmFindBase::AddPrefixPaths(std::vector<std::string> const& in_paths, } //---------------------------------------------------------------------------- -void cmFindBase::AddCMakePrefixPath(const char* variable) +void cmFindBase::AddCMakePrefixPath(const std::string& variable) { // Get a path from a CMake variable. if(const char* varPath = this->Makefile->GetDefinition(variable)) @@ -280,11 +280,11 @@ void cmFindBase::AddCMakePrefixPath(const char* variable) } //---------------------------------------------------------------------------- -void cmFindBase::AddEnvPrefixPath(const char* variable) +void cmFindBase::AddEnvPrefixPath(const std::string& variable) { // Get a path from the environment. std::vector<std::string> tmp; - cmSystemTools::GetPath(tmp, variable); + cmSystemTools::GetPath(tmp, variable.c_str()); this->AddPrefixPaths(tmp, EnvPath); } |