summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalGenerator.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/cmLocalGenerator.cxx
parent389ed56f63653e89b3d640cf7aebdc8ebe7ca643 (diff)
downloadCMake-8b6f439ef20cf882b4f3deba48f34a01a98963d9.zip
CMake-8b6f439ef20cf882b4f3deba48f34a01a98963d9.tar.gz
CMake-8b6f439ef20cf882b4f3deba48f34a01a98963d9.tar.bz2
Access string npos without instance
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r--Source/cmLocalGenerator.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index e48378d..0418521 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -140,7 +140,7 @@ cmLocalGenerator::cmLocalGenerator(cmGlobalGenerator* gg, cmMakefile* makefile)
for (const char* const* replaceIter = cmArrayBegin(ruleReplaceVars);
replaceIter != cmArrayEnd(ruleReplaceVars); ++replaceIter) {
std::string actualReplace = *replaceIter;
- if (actualReplace.find("${LANG}") != actualReplace.npos) {
+ if (actualReplace.find("${LANG}") != std::string::npos) {
cmSystemTools::ReplaceString(actualReplace, "${LANG}", lang);
}
@@ -1932,7 +1932,7 @@ void cmLocalGenerator::JoinDefines(const std::set<std::string>& defines,
// -DNAME="value" instead of -D"NAME=value" for historical reasons.
std::string::size_type eq = defineIt->find("=");
def += defineIt->substr(0, eq);
- if (eq != defineIt->npos) {
+ if (eq != std::string::npos) {
def += "=";
def += this->EscapeForShell(defineIt->c_str() + eq + 1, true);
}
@@ -2109,7 +2109,7 @@ static bool cmLocalGeneratorShortenObjectName(std::string& objName,
// its own md5 sum.
std::string::size_type pos =
objName.find('/', objName.size() - max_len + 32);
- if (pos != objName.npos) {
+ if (pos != std::string::npos) {
cmCryptoHash md5(cmCryptoHash::AlgoMD5);
std::string md5name = md5.HashString(objName.substr(0, pos));
md5name += objName.substr(pos);
@@ -2460,7 +2460,7 @@ bool cmLocalGenerator::CheckDefinition(std::string const& define) const
}
// Many compilers do not support # in the value so we disable it.
- if (define.find_first_of('#') != define.npos) {
+ if (define.find_first_of('#') != std::string::npos) {
std::ostringstream e;
/* clang-format off */
e << "WARNING: Preprocessor definitions containing '#' may not be "