Remove second arg: npos in substr usages

This commit is contained in:
Pavel Solodovnikov
2017-05-30 22:46:05 +03:00
committed by Brad King
parent 8b6f439ef2
commit db2d46e2dd
11 changed files with 15 additions and 17 deletions
+2 -2
View File
@@ -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 <"
+2 -2
View File
@@ -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(), '/', '\\');