summaryrefslogtreecommitdiffstats
path: root/Source/CPack
diff options
context:
space:
mode:
authorPavel Solodovnikov <hellyeahdominate@gmail.com>2017-05-30 19:46:05 (GMT)
committerBrad King <brad.king@kitware.com>2017-06-01 18:19:52 (GMT)
commitdb2d46e2ddbdf1c5d942e70b341e085f84e79c13 (patch)
tree37d613c818fcf588664ea3ac6cacc83d9966b176 /Source/CPack
parent8b6f439ef20cf882b4f3deba48f34a01a98963d9 (diff)
downloadCMake-db2d46e2ddbdf1c5d942e70b341e085f84e79c13.zip
CMake-db2d46e2ddbdf1c5d942e70b341e085f84e79c13.tar.gz
CMake-db2d46e2ddbdf1c5d942e70b341e085f84e79c13.tar.bz2
Remove second arg: npos in substr usages
Diffstat (limited to 'Source/CPack')
-rw-r--r--Source/CPack/cmCPackGenerator.cxx4
-rw-r--r--Source/CPack/cmCPackNSISGenerator.cxx4
2 files changed, 4 insertions, 4 deletions
diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx
index 3e113d3..d8e2753 100644
--- a/Source/CPack/cmCPackGenerator.cxx
+++ b/Source/CPack/cmCPackGenerator.cxx
@@ -811,8 +811,8 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
for (fit = result.begin(); fit != diff; ++fit) {
localFileName =
cmSystemTools::RelativePath(InstallPrefix, fit->c_str());
- localFileName = localFileName.substr(
- localFileName.find_first_not_of('/'), std::string::npos);
+ localFileName =
+ localFileName.substr(localFileName.find_first_not_of('/'));
Components[installComponent].Files.push_back(localFileName);
cmCPackLogger(cmCPackLog::LOG_DEBUG, "Adding file <"
<< localFileName << "> to component <"
diff --git a/Source/CPack/cmCPackNSISGenerator.cxx b/Source/CPack/cmCPackNSISGenerator.cxx
index beb2d01..9697a38 100644
--- a/Source/CPack/cmCPackNSISGenerator.cxx
+++ b/Source/CPack/cmCPackNSISGenerator.cxx
@@ -76,7 +76,7 @@ int cmCPackNSISGenerator::PackageFiles()
}
// Strip off the component part of the path.
- fileN = fileN.substr(pos + 1, std::string::npos);
+ fileN = fileN.substr(pos + 1);
}
std::replace(fileN.begin(), fileN.end(), '/', '\\');
@@ -106,7 +106,7 @@ int cmCPackNSISGenerator::PackageFiles()
componentName = fileN.substr(0, slash);
// Strip off the component part of the path.
- fileN = fileN.substr(slash + 1, std::string::npos);
+ fileN = fileN.substr(slash + 1);
}
}
std::replace(fileN.begin(), fileN.end(), '/', '\\');