mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-31 05:40:04 +00:00 
			
		
		
		
	Port yuzu-emu/yuzu#4605: "bootmanager: Prevent unnecessary copies in TouchUpdateEvent()" (#5539)
The list of points is returned by const reference, so we don't need to make a copy of every element in the list. Co-authored-by: Lioncash <mathew1800@gmail.com>
This commit is contained in:
		
							parent
							
								
									6a77547bde
								
							
						
					
					
						commit
						316a64961c
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		|  | @ -332,7 +332,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…
	
	Add table
		Add a link
		
	
		Reference in a new issue