diff options
author | Pavel Solodovnikov <hellyeahdominate@gmail.com> | 2017-05-30 19:37:46 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-06-01 18:19:51 (GMT) |
commit | 8b6f439ef20cf882b4f3deba48f34a01a98963d9 (patch) | |
tree | 9e42c3ee7dcbfc7f3d99af79a982735339993af5 /Source/CTest/cmCTestCoverageHandler.cxx | |
parent | 389ed56f63653e89b3d640cf7aebdc8ebe7ca643 (diff) | |
download | CMake-8b6f439ef20cf882b4f3deba48f34a01a98963d9.zip CMake-8b6f439ef20cf882b4f3deba48f34a01a98963d9.tar.gz CMake-8b6f439ef20cf882b4f3deba48f34a01a98963d9.tar.bz2 |
Access string npos without instance
Diffstat (limited to 'Source/CTest/cmCTestCoverageHandler.cxx')
-rw-r--r-- | Source/CTest/cmCTestCoverageHandler.cxx | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/Source/CTest/cmCTestCoverageHandler.cxx b/Source/CTest/cmCTestCoverageHandler.cxx index 87c532c..877cd24 100644 --- a/Source/CTest/cmCTestCoverageHandler.cxx +++ b/Source/CTest/cmCTestCoverageHandler.cxx @@ -103,6 +103,7 @@ public: return this->PipeState; } int GetProcessState() { return this->PipeState; } + private: int PipeState; cmsysProcess* Process; @@ -896,7 +897,7 @@ int cmCTestCoverageHandler::HandleBlanketJSCoverage( cmsys::ifstream in(files[fileEntry].c_str()); cmSystemTools::GetLineFromStream(in, line); cmSystemTools::GetLineFromStream(in, line); - if (line.find("node-jscoverage") != line.npos) { + if (line.find("node-jscoverage") != std::string::npos) { blanketFiles.push_back(files[fileEntry]); } } @@ -1222,7 +1223,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('#') != std::string::npos) { vec[lineIdx] = 0; } } @@ -1524,7 +1525,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('#') != std::string::npos) { vec[lineIdx] = 0; } } @@ -2127,7 +2128,7 @@ bool cmCTestCoverageHandler::GetNextInt(std::string const& inputLine, std::string::size_type start = pos; pos = inputLine.find(',', start); value = atoi(inputLine.substr(start, pos).c_str()); - if (pos == inputLine.npos) { + if (pos == std::string::npos) { return true; } pos++; @@ -2141,7 +2142,7 @@ bool cmCTestCoverageHandler::ParseBullsEyeCovsrcLine( { // find the first comma std::string::size_type pos = inputLine.find(','); - if (pos == inputLine.npos) { + if (pos == std::string::npos) { cmCTestLog(this->CTest, ERROR_MESSAGE, "Error parsing string : " << inputLine << "\n"); return false; @@ -2168,7 +2169,7 @@ bool cmCTestCoverageHandler::ParseBullsEyeCovsrcLine( return false; } // should be at the end now - if (pos != inputLine.npos) { + if (pos != std::string::npos) { cmCTestLog(this->CTest, ERROR_MESSAGE, "Error parsing input : " << inputLine << " last pos not npos = " << pos << "\n"); } |