diff options
author | Rolf Eike Beer <eike@sf-mail.de> | 2020-03-18 17:52:36 (GMT) |
---|---|---|
committer | Rolf Eike Beer <eike@sf-mail.de> | 2020-03-23 18:47:46 (GMT) |
commit | d6cf89c0d48cc8689a9d6219846b21a210557ed3 (patch) | |
tree | cd32592386db1575f20b68722b7a93ee6f2831c9 /Source/CPack | |
parent | a42d2b099ace3918864525247c7612431ecc2ad8 (diff) | |
download | CMake-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.cxx | 3 |
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 |