summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmParseBlanketJSCoverage.cxx
diff options
context:
space:
mode:
authorPavel Solodovnikov <hellyeahdominate@gmail.com>2017-05-30 19:37:46 (GMT)
committerBrad King <brad.king@kitware.com>2017-06-01 18:19:51 (GMT)
commit8b6f439ef20cf882b4f3deba48f34a01a98963d9 (patch)
tree9e42c3ee7dcbfc7f3d99af79a982735339993af5 /Source/CTest/cmParseBlanketJSCoverage.cxx
parent389ed56f63653e89b3d640cf7aebdc8ebe7ca643 (diff)
downloadCMake-8b6f439ef20cf882b4f3deba48f34a01a98963d9.zip
CMake-8b6f439ef20cf882b4f3deba48f34a01a98963d9.tar.gz
CMake-8b6f439ef20cf882b4f3deba48f34a01a98963d9.tar.bz2
Access string npos without instance
Diffstat (limited to 'Source/CTest/cmParseBlanketJSCoverage.cxx')
-rw-r--r--Source/CTest/cmParseBlanketJSCoverage.cxx34
1 files changed, 17 insertions, 17 deletions
diff --git a/Source/CTest/cmParseBlanketJSCoverage.cxx b/Source/CTest/cmParseBlanketJSCoverage.cxx
index e5d8a23..f7f3e41 100644
--- a/Source/CTest/cmParseBlanketJSCoverage.cxx
+++ b/Source/CTest/cmParseBlanketJSCoverage.cxx
@@ -35,7 +35,7 @@ public:
line.substr(begIndex + 3, endIndex - (begIndex + 4));
return foundFileName;
}
- return line.substr(begIndex, line.npos);
+ return line.substr(begIndex, std::string::npos);
}
bool ParseFile(std::string const& file)
{
@@ -51,13 +51,13 @@ public:
return false;
}
while (cmSystemTools::GetLineFromStream(in, line)) {
- if (line.find("filename") != line.npos) {
+ if (line.find("filename") != std::string::npos) {
if (foundFile) {
/*
- * Upon finding a second file name, generate a
- * vector within the total coverage to capture the
- * information in the local vector
- */
+ * Upon finding a second file name, generate a
+ * vector within the total coverage to capture the
+ * information in the local vector
+ */
FileLinesType& CoverageVector =
this->Coverage.TotalCoverage[filename];
CoverageVector = localCoverageVector;
@@ -66,19 +66,19 @@ public:
foundFile = true;
inSource = false;
filename = getValue(line, 0);
- } else if ((line.find("coverage") != line.npos) && foundFile &&
+ } else if ((line.find("coverage") != std::string::npos) && foundFile &&
inSource) {
/*
- * two types of "coverage" in the JSON structure
- *
- * The coverage result over the file or set of files
- * and the coverage for each individual line
- *
- * FoundFile and foundSource ensure that
- * only the value of the line coverage is captured
- */
+ * two types of "coverage" in the JSON structure
+ *
+ * The coverage result over the file or set of files
+ * and the coverage for each individual line
+ *
+ * FoundFile and foundSource ensure that
+ * only the value of the line coverage is captured
+ */
std::string result = getValue(line, 1);
- result = result.substr(2, result.npos);
+ result = result.substr(2, std::string::npos);
if (result == "\"\"") {
// Empty quotation marks indicate that the
// line is not executable
@@ -87,7 +87,7 @@ public:
// Else, it contains the number of time executed
localCoverageVector.push_back(atoi(result.c_str()));
}
- } else if (line.find("source") != line.npos) {
+ } else if (line.find("source") != std::string::npos) {
inSource = true;
}
}