aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickevents.cpp
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2016-07-14 11:25:59 +0200
committerShawn Rutledge <shawn.rutledge@qt.io>2016-07-14 11:59:42 +0000
commit44e9a4dbdf4cd6e444ab7ab2ec137e196fcc087c (patch)
tree1fb3df885eab84846067167521f287e9d2628c86 /src/quick/items/qquickevents.cpp
parentc100c6360881f4a151330d405e91346f61564674 (diff)
QQuickPointerEvent::touchPointById: capture pointId by value
It's a scalar, so capturing by reference is inefficient. Change-Id: Ieb6ba8f0ebeb630063e044a27363b2af50ab01ac Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Diffstat (limited to 'src/quick/items/qquickevents.cpp')
-rw-r--r--src/quick/items/qquickevents.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/quick/items/qquickevents.cpp b/src/quick/items/qquickevents.cpp
index 9c32c9781c..ef7d0218a5 100644
--- a/src/quick/items/qquickevents.cpp
+++ b/src/quick/items/qquickevents.cpp
@@ -584,7 +584,7 @@ const QTouchEvent::TouchPoint *QQuickPointerEvent::touchPointById(int pointId) c
return nullptr;
const QList<QTouchEvent::TouchPoint> &tps = ev->touchPoints();
auto it = std::find_if(tps.constBegin(), tps.constEnd(),
- [&pointId](QTouchEvent::TouchPoint const& tp) { return tp.id() == pointId; } );
+ [pointId](QTouchEvent::TouchPoint const& tp) { return tp.id() == pointId; } );
// return the pointer to the actual TP in QTouchEvent::_touchPoints
return (it == tps.end() ? nullptr : it.operator->());
}