mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-07 06:40:16 -05:00
remove needless check for std::string::substr()
Passing npos is legal and means "rest of the string".
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user