cmGeneratedFileStream: clang-tidy applied to remove redundant `c_str` calls

After changing the ``cmGeneratedFileStream`` methods to accept
``std::string const&`` instead of ``const char*`` we don't
need to call ``std::string::c_str`` anymore when passing
a ``std::string`` to a ``cmGeneratedFileStream`` method.

This patch removes all redundant ``std::string::c_str``
calls when passing a string to a ``cmGeneratedFileStream`` method.

It was generated by building CMake with clang-tidy enabled using
the following options:

-DCMAKE_CXX_CLANG_TIDY=/usr/bin/clang-tidy-4.0;-checks=-*,readability-redundant-string-cstr;-fix;-fix-errors
This commit is contained in:
Sebastian Holtermann
2018-08-07 15:01:25 +02:00
parent a688defcc6
commit b6802cd506
37 changed files with 87 additions and 93 deletions

View File

@@ -54,7 +54,7 @@ void cmExportLibraryDependenciesCommand::ConstFinalPass() const
cm::make_unique<cmsys::ofstream>(this->Filename.c_str(), std::ios::app);
} else {
std::unique_ptr<cmGeneratedFileStream> ap(
new cmGeneratedFileStream(this->Filename.c_str(), true));
new cmGeneratedFileStream(this->Filename, true));
ap->SetCopyIfDifferent(true);
foutPtr = std::move(ap);
}