summaryrefslogtreecommitdiff
path: root/Source/cmFileCommand.cxx
diff options
context:
space:
mode:
authorNils Gladitz <nilsgladitz@gmail.com>2014-10-15 14:54:05 +0200
committerNils Gladitz <nilsgladitz@gmail.com>2014-10-15 14:54:05 +0200
commitcc1139cc304b6bd4c8403d437cf08f73e06e243a (patch)
treee9645a08b795a6eef8233e82c07370bc3cfa0673 /Source/cmFileCommand.cxx
parent1b3495d32e1523648da08e138482a654f8765333 (diff)
downloadcmake-cc1139cc304b6bd4c8403d437cf08f73e06e243a.tar.gz
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/cmFileCommand.cxx')
-rw-r--r--Source/cmFileCommand.cxx16
1 files changed, 8 insertions, 8 deletions
diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx
index 1325cec928..93734d4de2 100644
--- a/Source/cmFileCommand.cxx
+++ b/Source/cmFileCommand.cxx
@@ -1504,7 +1504,7 @@ bool cmFileCopier::Run(std::vector<std::string> const& args)
{
// Split the input file into its directory and name components.
std::vector<std::string> fromPathComponents;
- cmSystemTools::SplitPath(files[i].c_str(), fromPathComponents);
+ cmSystemTools::SplitPath(files[i], fromPathComponents);
std::string fromName = *(fromPathComponents.end()-1);
std::string fromDir = cmSystemTools::JoinPath(fromPathComponents.begin(),
fromPathComponents.end()-1);
@@ -2203,7 +2203,7 @@ bool cmFileInstaller::HandleInstallDestination()
return false;
}
}
- if ( !cmSystemTools::FileIsDirectory(destination.c_str()) )
+ if ( !cmSystemTools::FileIsDirectory(destination) )
{
std::string errstring = "INSTALL destination: " + destination +
" is not a directory.";
@@ -2553,14 +2553,14 @@ bool cmFileCommand::HandleRemove(std::vector<std::string> const& args,
fileName += "/" + *i;
}
- if(cmSystemTools::FileIsDirectory(fileName.c_str()) &&
- !cmSystemTools::FileIsSymlink(fileName.c_str()) && recurse)
+ if(cmSystemTools::FileIsDirectory(fileName) &&
+ !cmSystemTools::FileIsSymlink(fileName) && recurse)
{
- cmSystemTools::RemoveADirectory(fileName.c_str());
+ cmSystemTools::RemoveADirectory(fileName);
}
else
{
- cmSystemTools::RemoveFile(fileName.c_str());
+ cmSystemTools::RemoveFile(fileName);
}
}
return true;
@@ -2584,7 +2584,7 @@ bool cmFileCommand::HandleCMakePathCommand(std::vector<std::string>
#else
char pathSep = ':';
#endif
- std::vector<cmsys::String> path = cmSystemTools::SplitString(i->c_str(),
+ std::vector<cmsys::String> path = cmSystemTools::SplitString(*i,
pathSep);
i++;
const char* var = i->c_str();
@@ -3241,7 +3241,7 @@ cmFileCommand::HandleUploadCommand(std::vector<std::string> const& args)
// Open file for reading:
//
- FILE *fin = cmsys::SystemTools::Fopen(filename.c_str(), "rb");
+ FILE *fin = cmsys::SystemTools::Fopen(filename, "rb");
if(!fin)
{
std::string errStr = "UPLOAD cannot open file '";