summaryrefslogtreecommitdiff
path: root/Source/cmRST.cxx
diff options
context:
space:
mode:
authorPavel Solodovnikov <hellyeahdominate@gmail.com>2017-05-30 22:37:46 +0300
committerBrad King <brad.king@kitware.com>2017-06-01 14:19:51 -0400
commit8b6f439ef20cf882b4f3deba48f34a01a98963d9 (patch)
tree9e42c3ee7dcbfc7f3d99af79a982735339993af5 /Source/cmRST.cxx
parent389ed56f63653e89b3d640cf7aebdc8ebe7ca643 (diff)
downloadcmake-8b6f439ef20cf882b4f3deba48f34a01a98963d9.tar.gz
Access string npos without instance
Diffstat (limited to 'Source/cmRST.cxx')
-rw-r--r--Source/cmRST.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/cmRST.cxx b/Source/cmRST.cxx
index 938cad93c4..12bbaf6379 100644
--- a/Source/cmRST.cxx
+++ b/Source/cmRST.cxx
@@ -80,7 +80,7 @@ void cmRST::ProcessModule(std::istream& is)
if (!rst.empty() && rst != "#") {
// Bracket mode: check for end bracket
std::string::size_type pos = line.find(rst);
- if (pos == line.npos) {
+ if (pos == std::string::npos) {
this->ProcessLine(line);
} else {
if (line[0] != '#') {
@@ -98,7 +98,7 @@ void cmRST::ProcessModule(std::istream& is)
continue;
}
if (line.substr(0, 2) == "# ") {
- this->ProcessLine(line.substr(2, line.npos));
+ this->ProcessLine(line.substr(2, std::string::npos));
continue;
}
rst = "";
@@ -156,8 +156,8 @@ void cmRST::ProcessLine(std::string const& line)
isspace(line[2]))) {
this->Reset();
this->Markup =
- (line.find_first_not_of(" \t", 2) == line.npos ? MarkupEmpty
- : MarkupNormal);
+ (line.find_first_not_of(" \t", 2) == std::string::npos ? MarkupEmpty
+ : MarkupNormal);
if (this->CMakeDirective.find(line)) {
// Output cmake domain directives and their content normally.
this->NormalLine(line);
@@ -252,7 +252,7 @@ void cmRST::OutputLine(std::string const& line_in, bool inlineMarkup)
// no explicit "(...)" then add "()" to the text.
if (this->CMakeRole.match(2) == "command" &&
this->CMakeRole.match(5).empty() &&
- text.find_first_of("()") == text.npos) {
+ text.find_first_of("()") == std::string::npos) {
text += "()";
}
this->OS << "``" << text << "``";