mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-31 05:40:04 +00:00 
			
		
		
		
	sink_details: std::move std::function instances
Given std::function is allowed to potentially allocate, these should be std::move'd to prevent potential reallocation (should that ever happen).
This commit is contained in:
		
							parent
							
								
									47025552c7
								
							
						
					
					
						commit
						50b58da56c
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		|  | @ -6,6 +6,7 @@ | |||
| 
 | ||||
| #include <functional> | ||||
| #include <memory> | ||||
| #include <utility> | ||||
| #include <vector> | ||||
| 
 | ||||
| namespace AudioCore { | ||||
|  | @ -15,7 +16,7 @@ class Sink; | |||
| struct SinkDetails { | ||||
|     SinkDetails(const char* id_, std::function<std::unique_ptr<Sink>(std::string)> factory_, | ||||
|                 std::function<std::vector<std::string>()> list_devices_) | ||||
|         : id(id_), factory(factory_), list_devices(list_devices_) {} | ||||
|         : id(id_), factory(std::move(factory_)), list_devices(std::move(list_devices_)) {} | ||||
| 
 | ||||
|     /// Name for this sink.
 | ||||
|     const char* id; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue