summaryrefslogtreecommitdiffstats
path: root/Source/cmExtraEclipseCDT4Generator.cxx
diff options
context:
space:
mode:
authorNils Gladitz <nilsgladitz@gmail.com>2014-10-15 12:54:05 (GMT)
committerNils Gladitz <nilsgladitz@gmail.com>2014-10-15 12:54:05 (GMT)
commitcc1139cc304b6bd4c8403d437cf08f73e06e243a (patch)
treee9645a08b795a6eef8233e82c07370bc3cfa0673 /Source/cmExtraEclipseCDT4Generator.cxx
parent1b3495d32e1523648da08e138482a654f8765333 (diff)
downloadCMake-cc1139cc304b6bd4c8403d437cf08f73e06e243a.zip
CMake-cc1139cc304b6bd4c8403d437cf08f73e06e243a.tar.gz
CMake-cc1139cc304b6bd4c8403d437cf08f73e06e243a.tar.bz2
strings: Remove redundant calls to std::string::c_str()
Replacements were detected and performed by the clang tool remove-cstr-calls on a linux build.
Diffstat (limited to 'Source/cmExtraEclipseCDT4Generator.cxx')
-rw-r--r--Source/cmExtraEclipseCDT4Generator.cxx18
1 files changed, 9 insertions, 9 deletions
diff --git a/Source/cmExtraEclipseCDT4Generator.cxx b/Source/cmExtraEclipseCDT4Generator.cxx
index 1beb3fd..2f69882 100644
--- a/Source/cmExtraEclipseCDT4Generator.cxx
+++ b/Source/cmExtraEclipseCDT4Generator.cxx
@@ -124,8 +124,8 @@ void cmExtraEclipseCDT4Generator::Generate()
"Enable CMAKE_ECLIPSE_GENERATE_SOURCE_PROJECT instead.");
}
- if (cmSystemTools::IsSubDirectory(this->HomeOutputDirectory.c_str(),
- this->HomeDirectory.c_str()))
+ if (cmSystemTools::IsSubDirectory(this->HomeOutputDirectory,
+ this->HomeDirectory))
{
mf->IssueMessage(cmake::WARNING, "The build directory is a subdirectory "
"of the source directory.\n"
@@ -495,8 +495,8 @@ void cmExtraEclipseCDT4Generator::CreateProjectFile()
std::string linkSourceDirectory = this->GetEclipsePath(
mf->GetStartDirectory());
// .project dir can't be subdir of a linked resource dir
- if (!cmSystemTools::IsSubDirectory(this->HomeOutputDirectory.c_str(),
- linkSourceDirectory.c_str()))
+ if (!cmSystemTools::IsSubDirectory(this->HomeOutputDirectory,
+ linkSourceDirectory))
{
this->AppendLinkedResource(fout, sourceLinkedResourceName,
this->GetEclipsePath(linkSourceDirectory),
@@ -590,7 +590,7 @@ void cmExtraEclipseCDT4Generator::CreateLinksForTargets(
++fileIt)
{
std::string fullPath = (*fileIt)->GetFullPath();
- if (!cmSystemTools::FileIsDirectory(fullPath.c_str()))
+ if (!cmSystemTools::FileIsDirectory(fullPath))
{
std::string linkName4 = linkName3;
linkName4 += "/";
@@ -635,8 +635,8 @@ void cmExtraEclipseCDT4Generator::CreateLinksToSubprojects(
// a linked resource must not point to a parent directory of .project or
// .project itself
if ((baseDir != linkSourceDirectory) &&
- !cmSystemTools::IsSubDirectory(baseDir.c_str(),
- linkSourceDirectory.c_str()))
+ !cmSystemTools::IsSubDirectory(baseDir,
+ linkSourceDirectory))
{
std::string linkName = "[Subprojects]/";
linkName += it->first;
@@ -663,7 +663,7 @@ void cmExtraEclipseCDT4Generator::AppendIncludeDirectories(
{
if (!inc->empty())
{
- std::string dir = cmSystemTools::CollapseFullPath(inc->c_str());
+ std::string dir = cmSystemTools::CollapseFullPath(*inc);
// handle framework include dirs on OSX, the remainder after the
// Frameworks/ part has to be stripped
@@ -819,7 +819,7 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
// exlude source directory from output search path
// - only if not named the same as an output directory
if (!cmSystemTools::FileIsDirectory(
- std::string(this->HomeOutputDirectory + "/" + *it).c_str()))
+ std::string(this->HomeOutputDirectory + "/" + *it)))
{
excludeFromOut += this->EscapeForXML(*it) + "/|";
}