summaryrefslogtreecommitdiffstats
path: root/Source/cmcmd.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2014-03-10 23:04:11 (GMT)
committerStephen Kelly <steveire@gmail.com>2014-03-11 14:03:50 (GMT)
commit21c573f682f9eafbc8d4402f7febbb1bec1cb86a (patch)
tree8c9e0b913c7de5737a770430064ff5533a19477d /Source/cmcmd.cxx
parente21ffaf8fe5499426604b4ebb9cd08798ee6107c (diff)
downloadCMake-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/cmcmd.cxx')
-rw-r--r--Source/cmcmd.cxx16
1 files changed, 8 insertions, 8 deletions
diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx
index 047f09d..ad1f2a5 100644
--- a/Source/cmcmd.cxx
+++ b/Source/cmcmd.cxx
@@ -613,16 +613,16 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string>& args)
startDir = cmSystemTools::CollapseFullPath(startDir.c_str());
homeOutDir = cmSystemTools::CollapseFullPath(homeOutDir.c_str());
startOutDir = cmSystemTools::CollapseFullPath(startOutDir.c_str());
- cm.SetHomeDirectory(homeDir.c_str());
- cm.SetStartDirectory(startDir.c_str());
- cm.SetHomeOutputDirectory(homeOutDir.c_str());
- cm.SetStartOutputDirectory(startOutDir.c_str());
- if(cmGlobalGenerator* ggd = cm.CreateGlobalGenerator(gen.c_str()))
+ cm.SetHomeDirectory(homeDir);
+ cm.SetStartDirectory(startDir);
+ cm.SetHomeOutputDirectory(homeOutDir);
+ cm.SetStartOutputDirectory(startOutDir);
+ if(cmGlobalGenerator* ggd = cm.CreateGlobalGenerator(gen))
{
cm.SetGlobalGenerator(ggd);
cmsys::auto_ptr<cmLocalGenerator> lgd(ggd->CreateLocalGenerator());
- lgd->GetMakefile()->SetStartDirectory(startDir.c_str());
- lgd->GetMakefile()->SetStartOutputDirectory(startOutDir.c_str());
+ lgd->GetMakefile()->SetStartDirectory(startDir);
+ lgd->GetMakefile()->SetStartOutputDirectory(startOutDir);
lgd->GetMakefile()->MakeStartDirectoriesCurrent();
// Actually scan dependencies.
@@ -667,7 +667,7 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string>& args)
{
cmQtAutoGenerators autogen;
std::string const& config = args[3];
- bool autogenSuccess = autogen.Run(args[2].c_str(), config);
+ bool autogenSuccess = autogen.Run(args[2], config);
return autogenSuccess ? 0 : 1;
}
#endif