Change lambda capture

This commit is contained in:
Jonas Kvinge 2021-06-21 20:10:02 +02:00
parent 59e11d6caa
commit d4f10c61ef
2 changed files with 3 additions and 3 deletions

View File

@ -591,7 +591,7 @@ void CollectionModel::SongsDeleted(const SongList &songs) {
// Look to see if there are any other items still under this divider
QList<CollectionItem*> 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 {

View File

@ -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;
}