summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratedFileStream.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/cmGeneratedFileStream.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/cmGeneratedFileStream.cxx')
-rw-r--r--Source/cmGeneratedFileStream.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/cmGeneratedFileStream.cxx b/Source/cmGeneratedFileStream.cxx
index 78ad4b2..600b793 100644
--- a/Source/cmGeneratedFileStream.cxx
+++ b/Source/cmGeneratedFileStream.cxx
@@ -152,7 +152,7 @@ void cmGeneratedFileStreamBase::Open(const char* name)
#endif
// Make sure the temporary file that will be used is not present.
- cmSystemTools::RemoveFile(this->TempName.c_str());
+ cmSystemTools::RemoveFile(this->TempName);
std::string dir = cmSystemTools::GetFilenamePath(this->TempName);
cmSystemTools::MakeDirectory(dir.c_str());
@@ -174,7 +174,7 @@ bool cmGeneratedFileStreamBase::Close()
if(!this->Name.empty() &&
this->Okay &&
(!this->CopyIfDifferent ||
- cmSystemTools::FilesDiffer(this->TempName.c_str(), resname.c_str())))
+ cmSystemTools::FilesDiffer(this->TempName, resname)))
{
// The destination is to be replaced. Rename the temporary to the
// destination atomically.
@@ -185,7 +185,7 @@ bool cmGeneratedFileStreamBase::Close()
{
this->RenameFile(gzname.c_str(), resname.c_str());
}
- cmSystemTools::RemoveFile(gzname.c_str());
+ cmSystemTools::RemoveFile(gzname);
}
else
{
@@ -198,7 +198,7 @@ bool cmGeneratedFileStreamBase::Close()
// Else, the destination was not replaced.
//
// Always delete the temporary file. We never want it to stay around.
- cmSystemTools::RemoveFile(this->TempName.c_str());
+ cmSystemTools::RemoveFile(this->TempName);
return replaced;
}