summaryrefslogtreecommitdiff
path: root/Source/cmDependsFortran.cxx
diff options
context:
space:
mode:
authorSebastian Holtermann <sebholt@xwmw.org>2018-08-07 15:01:25 +0200
committerSebastian Holtermann <sebholt@xwmw.org>2018-08-07 17:02:39 +0200
commitb6802cd506cd459f94fae7e4cadc8b94daa09d59 (patch)
treea74ed3696e442cdb1bb08ee4c0f09263b8d19a71 /Source/cmDependsFortran.cxx
parenta688defcc6e0195eefedd2cbc70ec5e40534f597 (diff)
downloadcmake-b6802cd506cd459f94fae7e4cadc8b94daa09d59.tar.gz
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
Diffstat (limited to 'Source/cmDependsFortran.cxx')
-rw-r--r--Source/cmDependsFortran.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmDependsFortran.cxx b/Source/cmDependsFortran.cxx
index dbea15ae04..a04cee7902 100644
--- a/Source/cmDependsFortran.cxx
+++ b/Source/cmDependsFortran.cxx
@@ -178,7 +178,7 @@ bool cmDependsFortran::Finalize(std::ostream& makeDepends,
// Store the list of modules provided by this target.
std::string fiName = this->TargetDirectory;
fiName += "/fortran.internal";
- cmGeneratedFileStream fiStream(fiName.c_str());
+ cmGeneratedFileStream fiStream(fiName);
fiStream << "# The fortran modules provided by this target.\n";
fiStream << "provides\n";
std::set<std::string> const& provides = this->Internal->TargetProvides;
@@ -190,7 +190,7 @@ bool cmDependsFortran::Finalize(std::ostream& makeDepends,
if (!provides.empty()) {
std::string fcName = this->TargetDirectory;
fcName += "/cmake_clean_Fortran.cmake";
- cmGeneratedFileStream fcStream(fcName.c_str());
+ cmGeneratedFileStream fcStream(fcName);
fcStream << "# Remove fortran modules provided by this target.\n";
fcStream << "FILE(REMOVE";
std::string currentBinDir =