Use std::any_of

This commit is contained in:
Jonas Kvinge
2021-06-21 19:52:37 +02:00
parent 6a7959547e
commit c61d1ce6b4
12 changed files with 55 additions and 70 deletions

View File

@@ -519,10 +519,10 @@ bool EditTagDialog::DoesValueVary(const QModelIndexList &sel, const QString &id)
bool EditTagDialog::IsValueModified(const QModelIndexList &sel, const QString &id) const {
for (const QModelIndex &i : sel) {
if (data_[i.row()].original_value(id) != data_[i.row()].current_value(id))
return true;
if (std::any_of(sel.begin(), sel.end(), [=](const QModelIndex &i){ return data_[i.row()].original_value(id) != data_[i.row()].current_value(id); })) {
return true;
}
return false;
}