summaryrefslogtreecommitdiffstats
path: root/Source/cmGetDirectoryPropertyCommand.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/cmGetDirectoryPropertyCommand.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/cmGetDirectoryPropertyCommand.cxx')
-rw-r--r--Source/cmGetDirectoryPropertyCommand.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/Source/cmGetDirectoryPropertyCommand.cxx b/Source/cmGetDirectoryPropertyCommand.cxx
index 9e76e1b..fcc3da1 100644
--- a/Source/cmGetDirectoryPropertyCommand.cxx
+++ b/Source/cmGetDirectoryPropertyCommand.cxx
@@ -54,7 +54,7 @@ bool cmGetDirectoryPropertyCommand
// lookup the makefile from the directory name
cmLocalGenerator *lg =
this->Makefile->GetLocalGenerator()->GetGlobalGenerator()->
- FindLocalGenerator(sd.c_str());
+ FindLocalGenerator(sd);
if (!lg)
{
this->SetError
@@ -79,18 +79,18 @@ bool cmGetDirectoryPropertyCommand
"providing the name of the variable to get.");
return false;
}
- output = dir->GetSafeDefinition(i->c_str());
- this->Makefile->AddDefinition(variable.c_str(), output.c_str());
+ output = dir->GetSafeDefinition(*i);
+ this->Makefile->AddDefinition(variable, output.c_str());
return true;
}
- const char *prop = dir->GetProperty(i->c_str());
+ const char *prop = dir->GetProperty(*i);
if (prop)
{
- this->Makefile->AddDefinition(variable.c_str(), prop);
+ this->Makefile->AddDefinition(variable, prop);
return true;
}
- this->Makefile->AddDefinition(variable.c_str(), "");
+ this->Makefile->AddDefinition(variable, "");
return true;
}