summaryrefslogtreecommitdiffstats
path: root/Source/cmDepends.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/cmDepends.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/cmDepends.cxx')
-rw-r--r--Source/cmDepends.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/cmDepends.cxx b/Source/cmDepends.cxx
index 51150f2..50a395e 100644
--- a/Source/cmDepends.cxx
+++ b/Source/cmDepends.cxx
@@ -47,7 +47,7 @@ bool cmDepends::Write(std::ostream &makeDepends,
std::string srcLang = "CMAKE_DEPENDS_CHECK_";
srcLang += this->Language;
cmMakefile* mf = this->LocalGenerator->GetMakefile();
- const char* srcStr = mf->GetSafeDefinition(srcLang.c_str());
+ const char* srcStr = mf->GetSafeDefinition(srcLang);
std::vector<std::string> pairs;
cmSystemTools::ExpandListArgument(srcStr, pairs);
@@ -61,7 +61,7 @@ bool cmDepends::Write(std::ostream &makeDepends,
std::string obj = *si++;
// Make sure the object file is relative to the top of the build tree.
- obj = this->LocalGenerator->Convert(obj.c_str(),
+ obj = this->LocalGenerator->Convert(obj,
cmLocalGenerator::HOME_OUTPUT,
cmLocalGenerator::MAKEFILE);
dependencies[obj].insert(src);
@@ -305,7 +305,7 @@ void cmDepends::SetIncludePathFromLanguage(const std::string& lang)
includePathVar += lang;
includePathVar += "_TARGET_INCLUDE_PATH";
cmMakefile* mf = this->LocalGenerator->GetMakefile();
- includePath = mf->GetDefinition(includePathVar.c_str());
+ includePath = mf->GetDefinition(includePathVar);
if(includePath)
{
cmSystemTools::ExpandListArgument(includePath, this->IncludePath);
@@ -316,7 +316,7 @@ void cmDepends::SetIncludePathFromLanguage(const std::string& lang)
includePathVar = "CMAKE_";
includePathVar += lang;
includePathVar += "_INCLUDE_PATH";
- includePath = mf->GetDefinition(includePathVar.c_str());
+ includePath = mf->GetDefinition(includePathVar);
if(includePath)
{
cmSystemTools::ExpandListArgument(includePath, this->IncludePath);