summaryrefslogtreecommitdiff
path: root/Source/cmGeneratorExpression.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/cmGeneratorExpression.cxx
parent389ed56f63653e89b3d640cf7aebdc8ebe7ca643 (diff)
downloadcmake-8b6f439ef20cf882b4f3deba48f34a01a98963d9.tar.gz
Access string npos without instance
Diffstat (limited to 'Source/cmGeneratorExpression.cxx')
-rw-r--r--Source/cmGeneratorExpression.cxx6
1 files changed, 3 insertions, 3 deletions
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()) {