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/cmLoadCommandCommand.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/cmLoadCommandCommand.cxx')
-rw-r--r-- | Source/cmLoadCommandCommand.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/cmLoadCommandCommand.cxx b/Source/cmLoadCommandCommand.cxx index 36e9980..a4063a6 100644 --- a/Source/cmLoadCommandCommand.cxx +++ b/Source/cmLoadCommandCommand.cxx @@ -201,7 +201,7 @@ bool cmLoadCommandCommand // Start by removing the definition in case of failure. std::string reportVar = "CMAKE_LOADED_COMMAND_"; reportVar += args[0]; - this->Makefile->RemoveDefinition(reportVar.c_str()); + this->Makefile->RemoveDefinition(reportVar); // the file must exist std::string moduleName = @@ -219,7 +219,7 @@ bool cmLoadCommandCommand cmSystemTools::ExpandRegistryValues(exp); // Glob the entry in case of wildcards. - cmSystemTools::GlobDirs(exp.c_str(), path); + cmSystemTools::GlobDirs(exp, path); } // Try to find the program. @@ -229,7 +229,7 @@ bool cmLoadCommandCommand cmOStringStream e; e << "Attempt to load command failed from file \"" << moduleName << "\""; - this->SetError(e.str().c_str()); + this->SetError(e.str()); return false; } @@ -246,12 +246,12 @@ bool cmLoadCommandCommand err += " Additional error info is:\n"; err += error; } - this->SetError(err.c_str()); + this->SetError(err); return false; } // Report what file was loaded for this command. - this->Makefile->AddDefinition(reportVar.c_str(), fullPath.c_str()); + this->Makefile->AddDefinition(reportVar, fullPath.c_str()); // find the init function std::string initFuncName = args[0] + "Init"; |