mirror of
https://git.h3cjp.net/H3cJP/citra.git
synced 2024-11-23 23:12:45 +00:00
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.
This commit is contained in:
parent
57d9ef5a89
commit
1aba91e993
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue