diff options
Diffstat (limited to 'Source/cmExtraEclipseCDT4Generator.cxx')
-rw-r--r-- | Source/cmExtraEclipseCDT4Generator.cxx | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/Source/cmExtraEclipseCDT4Generator.cxx b/Source/cmExtraEclipseCDT4Generator.cxx index 7867ad6..d64b0d7 100644 --- a/Source/cmExtraEclipseCDT4Generator.cxx +++ b/Source/cmExtraEclipseCDT4Generator.cxx @@ -125,8 +125,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" @@ -496,8 +496,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), @@ -591,7 +591,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 += "/"; @@ -636,8 +636,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; @@ -664,7 +664,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 @@ -820,7 +820,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) + "/|"; } @@ -1180,7 +1180,7 @@ std::string cmExtraEclipseCDT4Generator::GetPathBasename(const std::string& path) { std::string outputBasename = path; - while (outputBasename.size() > 0 && + while (!outputBasename.empty() && (outputBasename[outputBasename.size() - 1] == '/' || outputBasename[outputBasename.size() - 1] == '\\')) { |