diff options
| author | 2020-08-29 23:22:39 -0400 | |
|---|---|---|
| committer | 2020-08-29 23:22:39 -0400 | |
| commit | 37faf24c3f5e234060348fd20b40b8b803d34257 (patch) | |
| tree | eae29fc85a994585aa6aa30a2814ef2fa246e5a2 | |
| parent | Merge pull request #4604 from lioncash/lifetime (diff) | |
| parent | bootmanager: Prevent unnecessary copies in TouchUpdateEvent() (diff) | |
| download | yuzu-37faf24c3f5e234060348fd20b40b8b803d34257.tar.gz yuzu-37faf24c3f5e234060348fd20b40b8b803d34257.tar.xz yuzu-37faf24c3f5e234060348fd20b40b8b803d34257.zip | |
Merge pull request #4605 from lioncash/copy3
bootmanager: Prevent unnecessary copies in TouchUpdateEvent()
| -rw-r--r-- | src/yuzu/bootmanager.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/yuzu/bootmanager.cpp b/src/yuzu/bootmanager.cpp index 32b548c56..21707e451 100644 --- a/src/yuzu/bootmanager.cpp +++ b/src/yuzu/bootmanager.cpp | |||
| @@ -452,7 +452,7 @@ void GRenderWindow::TouchUpdateEvent(const QTouchEvent* event) { | |||
| 452 | int active_points = 0; | 452 | int active_points = 0; |
| 453 | 453 | ||
| 454 | // average all active touch points | 454 | // average all active touch points |
| 455 | for (const auto tp : event->touchPoints()) { | 455 | for (const auto& tp : event->touchPoints()) { |
| 456 | if (tp.state() & (Qt::TouchPointPressed | Qt::TouchPointMoved | Qt::TouchPointStationary)) { | 456 | if (tp.state() & (Qt::TouchPointPressed | Qt::TouchPointMoved | Qt::TouchPointStationary)) { |
| 457 | active_points++; | 457 | active_points++; |
| 458 | pos += tp.pos(); | 458 | pos += tp.pos(); |