diff options
author | Brad King <brad.king@kitware.com> | 2017-06-02 13:19:27 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2017-06-02 13:19:37 (GMT) |
commit | 78d1a2d0bbda1798ffc71b11a181d376914bdc3c (patch) | |
tree | d9c01f2146c5e9beeb354cf26f9ceacea6fdf3dc /Source/cmGeneratorExpression.cxx | |
parent | 0a082be80086931557df57a7171e80187ddf8aa8 (diff) | |
parent | db2d46e2ddbdf1c5d942e70b341e085f84e79c13 (diff) | |
download | CMake-78d1a2d0bbda1798ffc71b11a181d376914bdc3c.zip CMake-78d1a2d0bbda1798ffc71b11a181d376914bdc3c.tar.gz CMake-78d1a2d0bbda1798ffc71b11a181d376914bdc3c.tar.bz2 |
Merge topic 'string-npos-cleanup'
db2d46e2 Remove second arg: npos in substr usages
8b6f439e Access string npos without instance
389ed56f cmLocalUnixMakefileGenerator3: Remove unnecessary local variable
9fe4a9e2 cmParseBlanketJSCoverage: Pass unmodified parameter as const&
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !905
Diffstat (limited to 'Source/cmGeneratorExpression.cxx')
-rw-r--r-- | Source/cmGeneratorExpression.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/cmGeneratorExpression.cxx b/Source/cmGeneratorExpression.cxx index 570aa6e..00b5ff4 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()) { |