mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-30 21:30:04 +00:00 
			
		
		
		
	param_package: Get rid of file-static std::string construction
Avoids potential dynamic allocation occuring during program launch
This commit is contained in:
		
							parent
							
								
									4a3c4f5f67
								
							
						
					
					
						commit
						290bfa1804
					
				
					 1 changed files with 4 additions and 3 deletions
				
			
		|  | @ -12,10 +12,11 @@ namespace Common { | |||
| 
 | ||||
| constexpr char KEY_VALUE_SEPARATOR = ':'; | ||||
| constexpr char PARAM_SEPARATOR = ','; | ||||
| 
 | ||||
| constexpr char ESCAPE_CHARACTER = '$'; | ||||
| const std::string KEY_VALUE_SEPARATOR_ESCAPE{ESCAPE_CHARACTER, '0'}; | ||||
| const std::string PARAM_SEPARATOR_ESCAPE{ESCAPE_CHARACTER, '1'}; | ||||
| const std::string ESCAPE_CHARACTER_ESCAPE{ESCAPE_CHARACTER, '2'}; | ||||
| constexpr char KEY_VALUE_SEPARATOR_ESCAPE[] = "$0"; | ||||
| constexpr char PARAM_SEPARATOR_ESCAPE[] = "$1"; | ||||
| constexpr char ESCAPE_CHARACTER_ESCAPE[] = "$2"; | ||||
| 
 | ||||
| ParamPackage::ParamPackage(const std::string& serialized) { | ||||
|     std::vector<std::string> pairs; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue