summaryrefslogtreecommitdiffstats
path: root/Source/cmFindLibraryCommand.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/cmFindLibraryCommand.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/cmFindLibraryCommand.cxx')
-rw-r--r--Source/cmFindLibraryCommand.cxx20
1 files changed, 10 insertions, 10 deletions
diff --git a/Source/cmFindLibraryCommand.cxx b/Source/cmFindLibraryCommand.cxx
index fe5e45f..16deaab 100644
--- a/Source/cmFindLibraryCommand.cxx
+++ b/Source/cmFindLibraryCommand.cxx
@@ -107,7 +107,7 @@ void cmFindLibraryCommand::AddArchitecturePath(
// Follow "lib<suffix>".
std::string next_dir = cur_dir + suffix;
- if(cmSystemTools::FileIsDirectory(next_dir.c_str()))
+ if(cmSystemTools::FileIsDirectory(next_dir))
{
next_dir += dir.substr(pos+3);
std::string::size_type next_pos = pos+3+strlen(suffix)+1;
@@ -115,7 +115,7 @@ void cmFindLibraryCommand::AddArchitecturePath(
}
// Follow "lib".
- if(cmSystemTools::FileIsDirectory(cur_dir.c_str()))
+ if(cmSystemTools::FileIsDirectory(cur_dir))
{
this->AddArchitecturePath(dir, pos+3+1, suffix, false);
}
@@ -124,13 +124,13 @@ void cmFindLibraryCommand::AddArchitecturePath(
{
// Check for <dir><suffix>/.
std::string cur_dir = dir + suffix + "/";
- if(cmSystemTools::FileIsDirectory(cur_dir.c_str()))
+ if(cmSystemTools::FileIsDirectory(cur_dir))
{
this->SearchPaths.push_back(cur_dir);
}
// Now add the original unchanged path
- if(cmSystemTools::FileIsDirectory(dir.c_str()))
+ if(cmSystemTools::FileIsDirectory(dir))
{
this->SearchPaths.push_back(dir);
}
@@ -353,7 +353,7 @@ bool cmFindLibraryHelper::CheckDirectoryForName(std::string const& path,
if(cmSystemTools::FileExists(this->TestPath.c_str(), true))
{
this->BestPath =
- cmSystemTools::CollapseFullPath(this->TestPath.c_str());
+ cmSystemTools::CollapseFullPath(this->TestPath);
cmSystemTools::ConvertToUnixSlashes(this->BestPath);
return true;
}
@@ -382,7 +382,7 @@ bool cmFindLibraryHelper::CheckDirectoryForName(std::string const& path,
{
this->TestPath = path;
this->TestPath += origName;
- if(!cmSystemTools::FileIsDirectory(this->TestPath.c_str()))
+ if(!cmSystemTools::FileIsDirectory(this->TestPath))
{
// This is a matching file. Check if it is better than the
// best name found so far. Earlier prefixes are preferred,
@@ -506,9 +506,9 @@ std::string cmFindLibraryCommand::FindFrameworkLibraryNamesPerDir()
fwPath = *di;
fwPath += *ni;
fwPath += ".framework";
- if(cmSystemTools::FileIsDirectory(fwPath.c_str()))
+ if(cmSystemTools::FileIsDirectory(fwPath))
{
- return cmSystemTools::CollapseFullPath(fwPath.c_str());
+ return cmSystemTools::CollapseFullPath(fwPath);
}
}
}
@@ -532,9 +532,9 @@ std::string cmFindLibraryCommand::FindFrameworkLibraryDirsPerName()
fwPath = *di;
fwPath += *ni;
fwPath += ".framework";
- if(cmSystemTools::FileIsDirectory(fwPath.c_str()))
+ if(cmSystemTools::FileIsDirectory(fwPath))
{
- return cmSystemTools::CollapseFullPath(fwPath.c_str());
+ return cmSystemTools::CollapseFullPath(fwPath);
}
}
}