From 1aba91e993d933c30c4201a3ada3ea6dea96eebb Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sat, 29 Aug 2020 13:51:47 -0400 Subject: [PATCH] bootmanager: Prevent unnecessary copies in TouchUpdateEvent() The list of points is returned by const reference, so we don't need to make a copy of every element in the list. --- src/yuzu/bootmanager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/yuzu/bootmanager.cpp b/src/yuzu/bootmanager.cpp index f1b428bdee..a6d51c2912 100644 --- a/src/yuzu/bootmanager.cpp +++ b/src/yuzu/bootmanager.cpp @@ -452,7 +452,7 @@ void GRenderWindow::TouchUpdateEvent(const QTouchEvent* event) { int active_points = 0; // average all active touch points - for (const auto tp : event->touchPoints()) { + for (const auto& tp : event->touchPoints()) { if (tp.state() & (Qt::TouchPointPressed | Qt::TouchPointMoved | Qt::TouchPointStationary)) { active_points++; pos += tp.pos();