[vlc-commits] qt: networkmediamodel: avoid copying capture parameters
Alexandre Janniaux
git at videolan.org
Wed Jan 22 10:08:48 CET 2020
vlc | branch: master | Alexandre Janniaux <ajanni at videolabs.io> | Fri Jan 17 15:30:54 2020 +0100| [6f998111ffd5d8d0ad7e20d68a402914ce44cd41] | committer: Thomas Guillem
qt: networkmediamodel: avoid copying capture parameters
The lambda is not asynchronous and is read-only, so there is no need to
copy anything.
Signed-off-by: Thomas Guillem <thomas at gllm.fr>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6f998111ffd5d8d0ad7e20d68a402914ce44cd41
---
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();
});
More information about the vlc-commits
mailing list