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.
This commit is contained in:
Nils Gladitz
2014-10-15 14:54:05 +02:00
parent 1b3495d32e
commit cc1139cc30
74 changed files with 395 additions and 395 deletions

View File

@@ -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;
}