[vlc-devel] [PATCH 4/5] qt: networkmediamodel: avoid copying capture parameters
Alexandre Janniaux
ajanni at videolabs.io
Fri Jan 17 15:30:54 CET 2020
The lambda is not asynchronous and is read-only, so there is no need to
copy anything.
---
modules/gui/qt/network/networkmediamodel.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules/gui/qt/network/networkmediamodel.cpp b/modules/gui/qt/network/networkmediamodel.cpp
index 2fb3237f4a..2ee79da8c1 100644
--- a/modules/gui/qt/network/networkmediamodel.cpp
+++ b/modules/gui/qt/network/networkmediamodel.cpp
@@ -292,7 +292,7 @@ void NetworkMediaModel::onItemRemoved( MediaSourcePtr,
InputItemPtr p_item { children[i]->p_item };
QMetaObject::invokeMethod(this, [this, p_item=std::move(p_item)]() {
QUrl itemUri = QUrl::fromEncoded(p_item->psz_uri);
- auto it = std::find_if( begin( m_items ), end( m_items ), [p_item, itemUri](const Item& i) {
+ auto it = std::find_if( begin( m_items ), end( m_items ), [&](const Item& i) {
return QString::compare( qfu(p_item->psz_name), i.name, Qt::CaseInsensitive ) == 0 &&
itemUri.scheme() == i.mainMrl.scheme();
});
--
2.25.0
More information about the vlc-devel
mailing list