mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-19 15:07:22 -06:00
Don't use 'else' after return/break
This commit is contained in:
@@ -160,8 +160,8 @@ bool TransferListSortModel::lessThan(const QModelIndex &left, const QModelIndex
|
||||
const bool isAscendingOrder = (sortOrder() == Qt::AscendingOrder);
|
||||
if (isSeedingL)
|
||||
return !isAscendingOrder;
|
||||
else
|
||||
return isAscendingOrder;
|
||||
|
||||
return isAscendingOrder;
|
||||
}
|
||||
|
||||
const qlonglong etaL = left.data().toLongLong();
|
||||
@@ -171,15 +171,14 @@ bool TransferListSortModel::lessThan(const QModelIndex &left, const QModelIndex
|
||||
if (isInvalidL && isInvalidR) {
|
||||
if (isSeedingL) // Both seeding
|
||||
return dateLessThan(TransferListModel::TR_SEED_DATE, left, right, true);
|
||||
else
|
||||
return (prioL < prioR);
|
||||
|
||||
return (prioL < prioR);
|
||||
}
|
||||
else if (!isInvalidL && !isInvalidR) {
|
||||
if (!isInvalidL && !isInvalidR) {
|
||||
return (etaL < etaR);
|
||||
}
|
||||
else {
|
||||
return !isInvalidL;
|
||||
}
|
||||
|
||||
return !isInvalidL;
|
||||
}
|
||||
|
||||
case TransferListModel::TR_LAST_ACTIVITY: {
|
||||
@@ -221,8 +220,8 @@ bool TransferListSortModel::lowerPositionThan(const QModelIndex &left, const QMo
|
||||
if ((queueL > 0) || (queueR > 0)) {
|
||||
if ((queueL > 0) && (queueR > 0))
|
||||
return queueL < queueR;
|
||||
else
|
||||
return queueL != 0;
|
||||
|
||||
return queueL != 0;
|
||||
}
|
||||
|
||||
// Sort according to TR_SEED_DATE
|
||||
|
||||
Reference in New Issue
Block a user