summaryrefslogtreecommitdiff
path: root/Tests
diff options
context:
space:
mode:
authorDaniel Pfeifer <daniel@pfeifer-mail.de>2016-05-26 22:52:22 +0200
committerDaniel Pfeifer <daniel@pfeifer-mail.de>2016-05-26 22:52:22 +0200
commit1b2bb93302116a4791cf82e9cce028dfe87ef55d (patch)
treeb20aead9b34d9bdba3243439dd8f0aed032727e2 /Tests
parentacd8a73044e879286f0cfa24b54497a8307f204b (diff)
downloadcmake-1b2bb93302116a4791cf82e9cce028dfe87ef55d.tar.gz
Remove redundant c_str() calls.
Run clang-tidy's readability-redundant-string-cstr checker. Ignore findings in kwsys.
Diffstat (limited to 'Tests')
-rw-r--r--Tests/CMakeLib/PseudoMemcheck/memtester.cxx.in2
-rw-r--r--Tests/CMakeLib/testGeneratedFileStream.cxx16
2 files changed, 9 insertions, 9 deletions
diff --git a/Tests/CMakeLib/PseudoMemcheck/memtester.cxx.in b/Tests/CMakeLib/PseudoMemcheck/memtester.cxx.in
index c018e0862b..b141942c15 100644
--- a/Tests/CMakeLib/PseudoMemcheck/memtester.cxx.in
+++ b/Tests/CMakeLib/PseudoMemcheck/memtester.cxx.in
@@ -51,7 +51,7 @@ main(int ac, char **av)
}
if (!logfile.empty())
- cmSystemTools::Touch(logfile.c_str(), true);
+ cmSystemTools::Touch(logfile, true);
}
return RETVAL;
diff --git a/Tests/CMakeLib/testGeneratedFileStream.cxx b/Tests/CMakeLib/testGeneratedFileStream.cxx
index 128cab4bff..67dd69a792 100644
--- a/Tests/CMakeLib/testGeneratedFileStream.cxx
+++ b/Tests/CMakeLib/testGeneratedFileStream.cxx
@@ -81,14 +81,14 @@ int testGeneratedFileStream(int, char* [])
cmFailed("Something wrong with cmGeneratedFileStream. Cannot find file: ",
file1.c_str());
}
- cmSystemTools::RemoveFile(file1.c_str());
- cmSystemTools::RemoveFile(file2.c_str());
- cmSystemTools::RemoveFile(file3.c_str());
- cmSystemTools::RemoveFile(file4.c_str());
- cmSystemTools::RemoveFile(file1tmp.c_str());
- cmSystemTools::RemoveFile(file2tmp.c_str());
- cmSystemTools::RemoveFile(file3tmp.c_str());
- cmSystemTools::RemoveFile(file4tmp.c_str());
+ cmSystemTools::RemoveFile(file1);
+ cmSystemTools::RemoveFile(file2);
+ cmSystemTools::RemoveFile(file3);
+ cmSystemTools::RemoveFile(file4);
+ cmSystemTools::RemoveFile(file1tmp);
+ cmSystemTools::RemoveFile(file2tmp);
+ cmSystemTools::RemoveFile(file3tmp);
+ cmSystemTools::RemoveFile(file4tmp);
return failed;
}