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/CTest | |
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/CTest')
-rw-r--r-- | Source/CTest/cmCTestGenericHandler.cxx | 14 | ||||
-rw-r--r-- | Source/CTest/cmCTestGenericHandler.h | 6 |
2 files changed, 6 insertions, 14 deletions
diff --git a/Source/CTest/cmCTestGenericHandler.cxx b/Source/CTest/cmCTestGenericHandler.cxx index 5338f30..ae498ea 100644 --- a/Source/CTest/cmCTestGenericHandler.cxx +++ b/Source/CTest/cmCTestGenericHandler.cxx @@ -30,12 +30,8 @@ cmCTestGenericHandler::~cmCTestGenericHandler() } //---------------------------------------------------------------------- -void cmCTestGenericHandler::SetOption(const char* op, const char* value) +void cmCTestGenericHandler::SetOption(const std::string& op, const char* value) { - if ( !op ) - { - return; - } if ( !value ) { cmCTestGenericHandler::t_StringToString::iterator remit @@ -51,14 +47,10 @@ void cmCTestGenericHandler::SetOption(const char* op, const char* value) } //---------------------------------------------------------------------- -void cmCTestGenericHandler::SetPersistentOption(const char* op, +void cmCTestGenericHandler::SetPersistentOption(const std::string& op, const char* value) { this->SetOption(op, value); - if ( !op ) - { - return; - } if ( !value ) { cmCTestGenericHandler::t_StringToString::iterator remit @@ -88,7 +80,7 @@ void cmCTestGenericHandler::Initialize() } //---------------------------------------------------------------------- -const char* cmCTestGenericHandler::GetOption(const char* op) +const char* cmCTestGenericHandler::GetOption(const std::string& op) { cmCTestGenericHandler::t_StringToString::iterator remit = this->Options.find(op); diff --git a/Source/CTest/cmCTestGenericHandler.h b/Source/CTest/cmCTestGenericHandler.h index ba8febb..d05e230 100644 --- a/Source/CTest/cmCTestGenericHandler.h +++ b/Source/CTest/cmCTestGenericHandler.h @@ -74,9 +74,9 @@ public: typedef std::map<cmStdString,cmStdString> t_StringToString; - void SetPersistentOption(const char* op, const char* value); - void SetOption(const char* op, const char* value); - const char* GetOption(const char* op); + void SetPersistentOption(const std::string& op, const char* value); + void SetOption(const std::string& op, const char* value); + const char* GetOption(const std::string& op); void SetCommand(cmCTestCommand* command) { |