summaryrefslogtreecommitdiffstats
path: root/Source/CTest
diff options
context:
space:
mode:
Diffstat (limited to 'Source/CTest')
-rw-r--r--Source/CTest/cmCTestBuildHandler.cxx2
-rw-r--r--Source/CTest/cmCTestCoverageHandler.cxx4
-rw-r--r--Source/CTest/cmCTestScriptHandler.cxx7
-rw-r--r--Source/CTest/cmCTestSubmitHandler.cxx4
-rw-r--r--Source/CTest/cmCTestTestHandler.cxx2
-rw-r--r--Source/CTest/cmParseDelphiCoverage.cxx2
6 files changed, 11 insertions, 10 deletions
diff --git a/Source/CTest/cmCTestBuildHandler.cxx b/Source/CTest/cmCTestBuildHandler.cxx
index 20b0e9c..7141daf 100644
--- a/Source/CTest/cmCTestBuildHandler.cxx
+++ b/Source/CTest/cmCTestBuildHandler.cxx
@@ -617,7 +617,7 @@ void cmCTestBuildHandler::GenerateXMLLogScraped(cmXMLWriter& xml)
cmSystemTools::ConvertToUnixSlashes(cm->SourceFile);
if (cm->SourceFile.find("/.../") != cm->SourceFile.npos) {
cmSystemTools::ReplaceString(cm->SourceFile, "/.../", "");
- std::string::size_type p = cm->SourceFile.find("/");
+ std::string::size_type p = cm->SourceFile.find('/');
if (p != cm->SourceFile.npos) {
cm->SourceFile =
cm->SourceFile.substr(p + 1, cm->SourceFile.size() - p);
diff --git a/Source/CTest/cmCTestCoverageHandler.cxx b/Source/CTest/cmCTestCoverageHandler.cxx
index 550a774..51456ed 100644
--- a/Source/CTest/cmCTestCoverageHandler.cxx
+++ b/Source/CTest/cmCTestCoverageHandler.cxx
@@ -1238,7 +1238,7 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
// Initially all entries are -1 (not used). If we get coverage
// information, increment it to 0 first.
if (vec[lineIdx] < 0) {
- if (cov > 0 || prefix.find("#") != prefix.npos) {
+ if (cov > 0 || prefix.find('#') != prefix.npos) {
vec[lineIdx] = 0;
}
}
@@ -1543,7 +1543,7 @@ int cmCTestCoverageHandler::HandleLCovCoverage(
// Initially all entries are -1 (not used). If we get coverage
// information, increment it to 0 first.
if (vec[lineIdx] < 0) {
- if (cov > 0 || prefix.find("#") != prefix.npos) {
+ if (cov > 0 || prefix.find('#') != prefix.npos) {
vec[lineIdx] = 0;
}
}
diff --git a/Source/CTest/cmCTestScriptHandler.cxx b/Source/CTest/cmCTestScriptHandler.cxx
index 0c09cc7..ba0e816 100644
--- a/Source/CTest/cmCTestScriptHandler.cxx
+++ b/Source/CTest/cmCTestScriptHandler.cxx
@@ -330,9 +330,10 @@ int cmCTestScriptHandler::ReadInScript(const std::string& total_script_arg)
// passed into the scripts as S_ARG
std::string script = total_script_arg;
std::string script_arg;
- if (total_script_arg.find(",") != std::string::npos) {
- script = total_script_arg.substr(0, total_script_arg.find(","));
- script_arg = total_script_arg.substr(total_script_arg.find(",") + 1);
+ const std::string::size_type comma_pos = total_script_arg.find(',');
+ if (comma_pos != std::string::npos) {
+ script = total_script_arg.substr(0, comma_pos);
+ script_arg = total_script_arg.substr(comma_pos + 1);
}
// make sure the file exists
if (!cmSystemTools::FileExists(script.c_str())) {
diff --git a/Source/CTest/cmCTestSubmitHandler.cxx b/Source/CTest/cmCTestSubmitHandler.cxx
index bbc6b37..f373348 100644
--- a/Source/CTest/cmCTestSubmitHandler.cxx
+++ b/Source/CTest/cmCTestSubmitHandler.cxx
@@ -417,7 +417,7 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const std::string& localprefix,
}
}
std::string upload_as = url +
- ((url.find("?", 0) == std::string::npos) ? "?" : "&") + "FileName=" +
+ ((url.find('?') == std::string::npos) ? '?' : '&') + "FileName=" +
ofile;
upload_as += "&MD5=";
@@ -706,7 +706,7 @@ bool cmCTestSubmitHandler::TriggerUsingHTTP(const std::set<std::string>& files,
}
}
std::string turl = url +
- ((url.find("?", 0) == std::string::npos) ? "?" : "&") + "xmlfile=" +
+ ((url.find('?') == std::string::npos) ? '?' : '&') + "xmlfile=" +
ofile;
*this->LogFile << "Trigger url: " << turl << std::endl;
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx
index 4935f11..20ef693 100644
--- a/Source/CTest/cmCTestTestHandler.cxx
+++ b/Source/CTest/cmCTestTestHandler.cxx
@@ -1869,7 +1869,7 @@ bool cmCTestTestHandler::SetTestsProperties(
cmSystemTools::ExpandListArgument(val, rtit->Labels);
}
if (key == "MEASUREMENT") {
- size_t pos = val.find_first_of("=");
+ size_t pos = val.find_first_of('=');
if (pos != val.npos) {
std::string mKey = val.substr(0, pos);
const char* mVal = val.c_str() + pos + 1;
diff --git a/Source/CTest/cmParseDelphiCoverage.cxx b/Source/CTest/cmParseDelphiCoverage.cxx
index d20b16a..2e06078 100644
--- a/Source/CTest/cmParseDelphiCoverage.cxx
+++ b/Source/CTest/cmParseDelphiCoverage.cxx
@@ -171,7 +171,7 @@ public:
}
lastoffset = line.find("class=");
- endcovpos = line.find(">", lastoffset);
+ endcovpos = line.find('>', lastoffset);
lineresult = line.substr(lastoffset + 7, (endcovpos - 8) - lastoffset);
if (lineresult == "covered") {