summaryrefslogtreecommitdiffstats
path: root/Source/CPack
diff options
context:
space:
mode:
authorRolf Eike Beer <eike@sf-mail.de>2020-03-18 17:52:36 (GMT)
committerRolf Eike Beer <eike@sf-mail.de>2020-03-23 18:47:46 (GMT)
commitd6cf89c0d48cc8689a9d6219846b21a210557ed3 (patch)
treecd32592386db1575f20b68722b7a93ee6f2831c9 /Source/CPack
parenta42d2b099ace3918864525247c7612431ecc2ad8 (diff)
downloadCMake-d6cf89c0d48cc8689a9d6219846b21a210557ed3.zip
CMake-d6cf89c0d48cc8689a9d6219846b21a210557ed3.tar.gz
CMake-d6cf89c0d48cc8689a9d6219846b21a210557ed3.tar.bz2
remove needless check for std::string::substr()
Passing npos is legal and means "rest of the string".
Diffstat (limited to 'Source/CPack')
-rw-r--r--Source/CPack/IFW/cmCPackIFWPackage.cxx3
1 files changed, 1 insertions, 2 deletions
diff --git a/Source/CPack/IFW/cmCPackIFWPackage.cxx b/Source/CPack/IFW/cmCPackIFWPackage.cxx
index 9a9cd56..56a74c5 100644
--- a/Source/CPack/IFW/cmCPackIFWPackage.cxx
+++ b/Source/CPack/IFW/cmCPackIFWPackage.cxx
@@ -55,8 +55,7 @@ cmCPackIFWPackage::DependenceStruct::DependenceStruct(
if (dashPos != std::string::npos) {
pos = dashPos;
}
- this->Name =
- pos == std::string::npos ? dependence : dependence.substr(0, pos);
+ this->Name = dependence.substr(0, pos);
}
std::string cmCPackIFWPackage::DependenceStruct::NameWithCompare() const