diff options
author | Stephen Kelly <steveire@gmail.com> | 2014-03-10 23:04:11 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2014-03-11 14:03:50 (GMT) |
commit | 21c573f682f9eafbc8d4402f7febbb1bec1cb86a (patch) | |
tree | 8c9e0b913c7de5737a770430064ff5533a19477d /Source/cmGetFilenameComponentCommand.cxx | |
parent | e21ffaf8fe5499426604b4ebb9cd08798ee6107c (diff) | |
download | CMake-21c573f682f9eafbc8d4402f7febbb1bec1cb86a.zip CMake-21c573f682f9eafbc8d4402f7febbb1bec1cb86a.tar.gz CMake-21c573f682f9eafbc8d4402f7febbb1bec1cb86a.tar.bz2 |
Remove some c_str() calls.
Use the clang RemoveCStrCalls tool to automatically migrate the
code. This was only run on linux, so does not have any positive or
negative effect on other platforms.
Diffstat (limited to 'Source/cmGetFilenameComponentCommand.cxx')
-rw-r--r-- | Source/cmGetFilenameComponentCommand.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Source/cmGetFilenameComponentCommand.cxx b/Source/cmGetFilenameComponentCommand.cxx index 1d7fefc..10406d2 100644 --- a/Source/cmGetFilenameComponentCommand.cxx +++ b/Source/cmGetFilenameComponentCommand.cxx @@ -26,7 +26,7 @@ bool cmGetFilenameComponentCommand // already, if so use that value if(args.size() == 4 && args[3] == "CACHE") { - const char* cacheValue = this->Makefile->GetDefinition(args[0].c_str()); + const char* cacheValue = this->Makefile->GetDefinition(args[0]); if(cacheValue && !cmSystemTools::IsNOTFOUND(cacheValue)) { return true; @@ -107,7 +107,7 @@ bool cmGetFilenameComponentCommand else { std::string err = "unknown component " + args[2]; - this->SetError(err.c_str()); + this->SetError(err); return false; } @@ -116,12 +116,12 @@ bool cmGetFilenameComponentCommand if(programArgs.size() && storeArgs.size()) { this->Makefile->AddCacheDefinition - (storeArgs.c_str(), programArgs.c_str(), + (storeArgs, programArgs.c_str(), "", args[2] == "PATH" ? cmCacheManager::FILEPATH : cmCacheManager::STRING); } this->Makefile->AddCacheDefinition - (args[0].c_str(), result.c_str(), "", + (args[0], result.c_str(), "", args[2] == "PATH" ? cmCacheManager::FILEPATH : cmCacheManager::STRING); } @@ -129,9 +129,9 @@ bool cmGetFilenameComponentCommand { if(programArgs.size() && storeArgs.size()) { - this->Makefile->AddDefinition(storeArgs.c_str(), programArgs.c_str()); + this->Makefile->AddDefinition(storeArgs, programArgs.c_str()); } - this->Makefile->AddDefinition(args[0].c_str(), result.c_str()); + this->Makefile->AddDefinition(args[0], result.c_str()); } return true; |