summaryrefslogtreecommitdiffstats
path: root/Source/cmRulePlaceholderExpander.cxx
diff options
context:
space:
mode:
authorPavel Solodovnikov <hellyeahdominate@gmail.com>2017-05-30 19:37:46 (GMT)
committerBrad King <brad.king@kitware.com>2017-06-01 18:19:51 (GMT)
commit8b6f439ef20cf882b4f3deba48f34a01a98963d9 (patch)
tree9e42c3ee7dcbfc7f3d99af79a982735339993af5 /Source/cmRulePlaceholderExpander.cxx
parent389ed56f63653e89b3d640cf7aebdc8ebe7ca643 (diff)
downloadCMake-8b6f439ef20cf882b4f3deba48f34a01a98963d9.zip
CMake-8b6f439ef20cf882b4f3deba48f34a01a98963d9.tar.gz
CMake-8b6f439ef20cf882b4f3deba48f34a01a98963d9.tar.bz2
Access string npos without instance
Diffstat (limited to 'Source/cmRulePlaceholderExpander.cxx')
-rw-r--r--Source/cmRulePlaceholderExpander.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/cmRulePlaceholderExpander.cxx b/Source/cmRulePlaceholderExpander.cxx
index d5d2f67..a71861a 100644
--- a/Source/cmRulePlaceholderExpander.cxx
+++ b/Source/cmRulePlaceholderExpander.cxx
@@ -155,7 +155,7 @@ std::string cmRulePlaceholderExpander::ExpandRuleVariable(
// Strip the last extension off the target name.
std::string targetBase = replaceValues.Target;
std::string::size_type pos = targetBase.rfind('.');
- if (pos != targetBase.npos) {
+ if (pos != std::string::npos) {
return targetBase.substr(0, pos);
}
return targetBase;
@@ -270,7 +270,7 @@ std::string cmRulePlaceholderExpander::ExpandRuleVariable(
std::map<std::string, std::string>::iterator mapIt =
this->VariableMappings.find(variable);
if (mapIt != this->VariableMappings.end()) {
- if (variable.find("_FLAG") == variable.npos) {
+ if (variable.find("_FLAG") == std::string::npos) {
return outputConverter->ConvertToOutputForExisting(mapIt->second);
}
return mapIt->second;
@@ -284,15 +284,15 @@ void cmRulePlaceholderExpander::ExpandRuleVariables(
{
std::string::size_type start = s.find('<');
// no variables to expand
- if (start == s.npos) {
+ if (start == std::string::npos) {
return;
}
std::string::size_type pos = 0;
std::string expandedInput;
- while (start != s.npos && start < s.size() - 2) {
+ while (start != std::string::npos && start < s.size() - 2) {
std::string::size_type end = s.find('>', start);
// if we find a < with no > we are done
- if (end == s.npos) {
+ if (end == std::string::npos) {
return;
}
char c = s[start + 1];