mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-30 21:30:04 +00:00 
			
		
		
		
	telemetry: Default copy/move constructors and assignment operators
This provides the equivalent behavior, but without as much boilerplate. While we're at it, explicitly default the move constructor, since we have a move-assignment operator defined.
This commit is contained in:
		
							parent
							
								
									7f1303a834
								
							
						
					
					
						commit
						faa62b0d1e
					
				
					 1 changed files with 4 additions and 14 deletions
				
			
		|  | @ -58,21 +58,11 @@ public: | ||||||
|     Field(FieldType type, std::string name, T&& value) |     Field(FieldType type, std::string name, T&& value) | ||||||
|         : name(std::move(name)), type(type), value(std::move(value)) {} |         : name(std::move(name)), type(type), value(std::move(value)) {} | ||||||
| 
 | 
 | ||||||
|     Field(const Field& other) : Field(other.type, other.name, other.value) {} |     Field(const Field& other) = default; | ||||||
|  |     Field& operator=(const Field& other) = default; | ||||||
| 
 | 
 | ||||||
|     Field& operator=(const Field& other) { |     Field(Field&&) = default; | ||||||
|         type = other.type; |     Field& operator=(Field&& other) = default; | ||||||
|         name = other.name; |  | ||||||
|         value = other.value; |  | ||||||
|         return *this; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     Field& operator=(Field&& other) { |  | ||||||
|         type = other.type; |  | ||||||
|         name = std::move(other.name); |  | ||||||
|         value = std::move(other.value); |  | ||||||
|         return *this; |  | ||||||
|     } |  | ||||||
| 
 | 
 | ||||||
|     void Accept(VisitorInterface& visitor) const override; |     void Accept(VisitorInterface& visitor) const override; | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue