From d4f10c61ef25177ef14075e52431d71f2546c5a2 Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Mon, 21 Jun 2021 20:10:02 +0200 Subject: [PATCH] Change lambda capture --- src/collection/collectionmodel.cpp | 4 ++-- src/dialogs/edittagdialog.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/collection/collectionmodel.cpp b/src/collection/collectionmodel.cpp index f25e48ee3..590702bb7 100644 --- a/src/collection/collectionmodel.cpp +++ b/src/collection/collectionmodel.cpp @@ -591,7 +591,7 @@ void CollectionModel::SongsDeleted(const SongList &songs) { // Look to see if there are any other items still under this divider QList container_nodes = container_nodes_[0].values(); - if (std::any_of(container_nodes.begin(), container_nodes.end(), [=](CollectionItem *node){ return DividerKey(group_by_[0], node) == divider_key; })) { + if (std::any_of(container_nodes.begin(), container_nodes.end(), [this, divider_key](CollectionItem *node){ return DividerKey(group_by_[0], node) == divider_key; })) { continue; } @@ -786,7 +786,7 @@ QVariant CollectionModel::data(const CollectionItem *item, const int role) const if (item->children.isEmpty()) { return false; } - else if (std::any_of(item->children.begin(), item->children.end(), [=](CollectionItem *child) { return !data(child, role).toBool(); })) { + else if (std::any_of(item->children.begin(), item->children.end(), [this, role](CollectionItem *child) { return !data(child, role).toBool(); })) { return false; } else { diff --git a/src/dialogs/edittagdialog.cpp b/src/dialogs/edittagdialog.cpp index af2ed31bf..7db003e5b 100644 --- a/src/dialogs/edittagdialog.cpp +++ b/src/dialogs/edittagdialog.cpp @@ -519,7 +519,7 @@ bool EditTagDialog::DoesValueVary(const QModelIndexList &sel, const QString &id) bool EditTagDialog::IsValueModified(const QModelIndexList &sel, const QString &id) const { - if (std::any_of(sel.begin(), sel.end(), [=](const QModelIndex &i){ return data_[i.row()].original_value(id) != data_[i.row()].current_value(id); })) { + 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 true; }