summaryrefslogtreecommitdiff
path: root/Source/cmGlobalXCodeGenerator.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/cmGlobalXCodeGenerator.cxx
parent389ed56f63653e89b3d640cf7aebdc8ebe7ca643 (diff)
downloadcmake-8b6f439ef20cf882b4f3deba48f34a01a98963d9.tar.gz
Access string npos without instance
Diffstat (limited to 'Source/cmGlobalXCodeGenerator.cxx')
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 84740cae1b..64616ad933 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -170,7 +170,7 @@ cmGlobalGenerator* cmGlobalXCodeGenerator::Factory::CreateGlobalGenerator(
std::string::size_type pos;
if (cmSystemTools::RunSingleCommand("xcode-select --print-path", &out, 0,
0, 0, cmSystemTools::OUTPUT_NONE) &&
- (pos = out.find(".app/"), pos != out.npos)) {
+ (pos = out.find(".app/"), pos != std::string::npos)) {
versionFile = out.substr(0, pos + 5) + "Contents/version.plist";
}
}
@@ -244,7 +244,7 @@ std::string cmGlobalXCodeGenerator::FindXcodeBuildCommand()
bool cmGlobalXCodeGenerator::SetGeneratorToolset(std::string const& ts,
cmMakefile* mf)
{
- if (ts.find_first_of(",=") != ts.npos) {
+ if (ts.find_first_of(",=") != std::string::npos) {
std::ostringstream e;
/* clang-format off */
e <<
@@ -1400,7 +1400,7 @@ std::string cmGlobalXCodeGenerator::ExtractFlag(const char* flag,
std::string retFlag;
std::string::size_type lastOccurancePos = flags.rfind(flag);
bool saved = false;
- while (lastOccurancePos != flags.npos) {
+ while (lastOccurancePos != std::string::npos) {
// increment pos, we use lastOccurancePos to reduce search space on next
// inc
std::string::size_type pos = lastOccurancePos;
@@ -3423,7 +3423,7 @@ std::string cmGlobalXCodeGenerator::RelativeToBinary(const char* p)
std::string cmGlobalXCodeGenerator::XCodeEscapePath(const std::string& p)
{
- if (p.find(' ') != p.npos) {
+ if (p.find(' ') != std::string::npos) {
std::string t = "\"";
t += p;
t += "\"";
@@ -3511,7 +3511,7 @@ void cmGlobalXCodeGenerator::AppendFlag(std::string& flags,
// Check if the flag needs quoting.
bool quoteFlag =
- flag.find_first_of("`~!@#$%^&*()+={}[]|:;\"'<>,.? ") != flag.npos;
+ flag.find_first_of("`~!@#$%^&*()+={}[]|:;\"'<>,.? ") != std::string::npos;
// We escape a flag as follows:
// - Place each flag in single quotes ''