From 8b6f439ef20cf882b4f3deba48f34a01a98963d9 Mon Sep 17 00:00:00 2001 From: Pavel Solodovnikov Date: Tue, 30 May 2017 22:37:46 +0300 Subject: Access string npos without instance --- Source/cmGeneratorExpression.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Source/cmGeneratorExpression.cxx') diff --git a/Source/cmGeneratorExpression.cxx b/Source/cmGeneratorExpression.cxx index 570aa6ed5b..00b5ff4eff 100644 --- a/Source/cmGeneratorExpression.cxx +++ b/Source/cmGeneratorExpression.cxx @@ -126,7 +126,7 @@ cmCompiledGeneratorExpression::~cmCompiledGeneratorExpression() std::string cmGeneratorExpression::StripEmptyListElements( const std::string& input) { - if (input.find(';') == input.npos) { + if (input.find(';') == std::string::npos) { return input; } std::string result; @@ -161,7 +161,7 @@ static std::string stripAllGeneratorExpressions(const std::string& input) std::string::size_type pos = 0; std::string::size_type lastPos = pos; int nestingLevel = 0; - while ((pos = input.find("$<", lastPos)) != input.npos) { + while ((pos = input.find("$<", lastPos)) != std::string::npos) { result += input.substr(lastPos, pos - lastPos); pos += 2; nestingLevel = 1; @@ -290,7 +290,7 @@ void cmGeneratorExpression::Split(const std::string& input, { std::string::size_type pos = 0; std::string::size_type lastPos = pos; - while ((pos = input.find("$<", lastPos)) != input.npos) { + while ((pos = input.find("$<", lastPos)) != std::string::npos) { std::string part = input.substr(lastPos, pos - lastPos); std::string preGenex; if (!part.empty()) { -- cgit v1.2.1