summaryrefslogtreecommitdiffstats
path: root/Source/cmCTest.cxx
diff options
context:
space:
mode:
authorDaniel Pfeifer <daniel@pfeifer-mail.de>2016-05-24 19:24:10 (GMT)
committerDaniel Pfeifer <daniel@pfeifer-mail.de>2016-05-24 21:22:24 (GMT)
commit5784747d1b0404a0c1cb0223b15b823476023fba (patch)
tree763d07bbde561ad1a2322328764b93b6c1852db2 /Source/cmCTest.cxx
parent5cec953e6aafd4c132a7b6c0a929d95c1dee79ea (diff)
downloadCMake-5784747d1b0404a0c1cb0223b15b823476023fba.zip
CMake-5784747d1b0404a0c1cb0223b15b823476023fba.tar.gz
CMake-5784747d1b0404a0c1cb0223b15b823476023fba.tar.bz2
Improve string find: prefer character overloads.
Apply fix-its from clang-tidy's performance-faster-string-find checker. Ignore findings in kwsys.
Diffstat (limited to 'Source/cmCTest.cxx')
-rw-r--r--Source/cmCTest.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx
index 7e5d966..64e8078 100644
--- a/Source/cmCTest.cxx
+++ b/Source/cmCTest.cxx
@@ -721,7 +721,7 @@ bool cmCTest::UpdateCTestConfiguration()
if (line[0] == '#') {
continue;
}
- std::string::size_type cpos = line.find_first_of(":");
+ std::string::size_type cpos = line.find_first_of(':');
if (cpos == line.npos) {
continue;
}
@@ -2480,7 +2480,7 @@ void cmCTest::AddSubmitFile(Part part, const char* name)
void cmCTest::AddCTestConfigurationOverwrite(const std::string& overStr)
{
- size_t epos = overStr.find("=");
+ size_t epos = overStr.find('=');
if (epos == overStr.npos) {
cmCTestLog(this, ERROR_MESSAGE,
"CTest configuration overwrite specified in the wrong format."