summaryrefslogtreecommitdiff
path: root/Source/cmGetFilenameComponentCommand.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/cmGetFilenameComponentCommand.cxx
parent389ed56f63653e89b3d640cf7aebdc8ebe7ca643 (diff)
downloadcmake-8b6f439ef20cf882b4f3deba48f34a01a98963d9.tar.gz
Access string npos without instance
Diffstat (limited to 'Source/cmGetFilenameComponentCommand.cxx')
-rw-r--r--Source/cmGetFilenameComponentCommand.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/cmGetFilenameComponentCommand.cxx b/Source/cmGetFilenameComponentCommand.cxx
index 5915a67fab..c23684c221 100644
--- a/Source/cmGetFilenameComponentCommand.cxx
+++ b/Source/cmGetFilenameComponentCommand.cxx
@@ -28,7 +28,7 @@ bool cmGetFilenameComponentCommand::InitialPass(
std::string result;
std::string filename = args[1];
- if (filename.find("[HKEY") != filename.npos) {
+ if (filename.find("[HKEY") != std::string::npos) {
// Check the registry as the target application would view it.
cmSystemTools::KeyWOW64 view = cmSystemTools::KeyWOW64_32;
cmSystemTools::KeyWOW64 other_view = cmSystemTools::KeyWOW64_64;
@@ -37,10 +37,10 @@ bool cmGetFilenameComponentCommand::InitialPass(
other_view = cmSystemTools::KeyWOW64_32;
}
cmSystemTools::ExpandRegistryValues(filename, view);
- if (filename.find("/registry") != filename.npos) {
+ if (filename.find("/registry") != std::string::npos) {
std::string other = args[1];
cmSystemTools::ExpandRegistryValues(other, other_view);
- if (other.find("/registry") == other.npos) {
+ if (other.find("/registry") == std::string::npos) {
filename = other;
}
}