Simplify return
This commit is contained in:
parent
e5c85ddd32
commit
6d8b0b3ab6
@ -534,9 +534,7 @@ void MergedProxyModel::LayoutChanged() {
|
|||||||
|
|
||||||
bool MergedProxyModel::IsKnownModel(const QAbstractItemModel *model) const {
|
bool MergedProxyModel::IsKnownModel(const QAbstractItemModel *model) const {
|
||||||
|
|
||||||
if (model == this || model == sourceModel() || merge_points_.contains(const_cast<QAbstractItemModel*>(model)))
|
return (model == this || model == sourceModel() || merge_points_.contains(const_cast<QAbstractItemModel*>(model)));
|
||||||
return true;
|
|
||||||
return false;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -515,11 +515,7 @@ bool EditTagDialog::DoesValueVary(const QModelIndexList &sel, const QString &id)
|
|||||||
|
|
||||||
bool EditTagDialog::IsValueModified(const QModelIndexList &sel, const QString &id) const {
|
bool EditTagDialog::IsValueModified(const QModelIndexList &sel, const QString &id) const {
|
||||||
|
|
||||||
if (std::any_of(sel.begin(), sel.end(), [this, id](const QModelIndex &i){ return data_[i.row()].original_value(id) != data_[i.row()].current_value(id); })) {
|
return std::any_of(sel.begin(), sel.end(), [this, id](const QModelIndex &i){ return data_[i.row()].original_value(id) != data_[i.row()].current_value(id); });
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user