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/cmCTest.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/cmCTest.cxx')
-rw-r--r-- | Source/cmCTest.cxx | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index acedc1a..39b623d 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -2593,13 +2593,9 @@ int cmCTest::ReadCustomConfigurationFileTree(const char* dir, cmMakefile* mf) } //---------------------------------------------------------------------- -void cmCTest::PopulateCustomVector(cmMakefile* mf, const char* def, +void cmCTest::PopulateCustomVector(cmMakefile* mf, const std::string& def, VectorOfStrings& vec) { - if ( !def) - { - return; - } const char* dval = mf->GetDefinition(def); if ( !dval ) { @@ -2620,12 +2616,9 @@ void cmCTest::PopulateCustomVector(cmMakefile* mf, const char* def, } //---------------------------------------------------------------------- -void cmCTest::PopulateCustomInteger(cmMakefile* mf, const char* def, int& val) +void cmCTest::PopulateCustomInteger(cmMakefile* mf, const std::string& def, + int& val) { - if ( !def) - { - return; - } const char* dval = mf->GetDefinition(def); if ( !dval ) { @@ -2702,7 +2695,7 @@ std::string cmCTest::GetShortPathToFile(const char* cfname) } //---------------------------------------------------------------------- -std::string cmCTest::GetCTestConfiguration(const char *name) +std::string cmCTest::GetCTestConfiguration(const std::string& name) { if ( this->CTestConfigurationOverwrites.find(name) != this->CTestConfigurationOverwrites.end() ) @@ -2877,7 +2870,7 @@ void cmCTest::SetConfigType(const char* ct) //---------------------------------------------------------------------- bool cmCTest::SetCTestConfigurationFromCMakeVariable(cmMakefile* mf, - const char* dconfig, const char* cmake_var) + const char* dconfig, const std::string& cmake_var) { const char* ctvar; ctvar = mf->GetDefinition(cmake_var); |