mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-31 13:50:03 +00:00 
			
		
		
		
	kernel/shared_memory: std::move the string parameter in SetName()
This avoids a potential reallocation.
This commit is contained in:
		
							parent
							
								
									210e558bea
								
							
						
					
					
						commit
						067f09b41d
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		|  | @ -5,6 +5,7 @@ | |||
| #pragma once | ||||
| 
 | ||||
| #include <string> | ||||
| #include <utility> | ||||
| #include "common/common_types.h" | ||||
| #include "core/hle/kernel/object.h" | ||||
| #include "core/hle/kernel/process.h" | ||||
|  | @ -21,7 +22,7 @@ public: | |||
|         return name; | ||||
|     } | ||||
|     void SetName(std::string name) { | ||||
|         this->name = name; | ||||
|         this->name = std::move(name); | ||||
|     } | ||||
| 
 | ||||
|     static const HandleType HANDLE_TYPE = HandleType::SharedMemory; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue