mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-22 14:23:10 -05:00
Remove second arg: npos in substr usages
This commit is contained in:
committed by
Brad King
parent
8b6f439ef2
commit
db2d46e2dd
@@ -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 <"
|
||||
|
||||
@@ -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(), '/', '\\');
|
||||
|
||||
Reference in New Issue
Block a user