mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-20 07:27:22 -06:00
Simplify comparison
From https://doc.qt.io/qt-5/qdatetime.html#operator-eq-eq: >Since 5.14, all invalid datetimes are equal to one another and differ from all other datetimes.
This commit is contained in:
@@ -51,10 +51,8 @@ namespace
|
||||
const bool isLeftValid = left.isValid();
|
||||
const bool isRightValid = right.isValid();
|
||||
|
||||
if (isLeftValid && isRightValid)
|
||||
if (isLeftValid == isRightValid)
|
||||
return threeWayCompare(left, right);
|
||||
if (!isLeftValid && !isRightValid)
|
||||
return 0;
|
||||
return isLeftValid ? -1 : 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user