Use default move function
This commit is contained in:
		
							parent
							
								
									fe50f6590a
								
							
						
					
					
						commit
						85454857d3
					
				| @ -242,19 +242,9 @@ class DeallocatingVector | ||||
|     // copying is not safe since this would only do a shallow copy
 | ||||
|     DeallocatingVector(DeallocatingVector &other) = delete; | ||||
|     DeallocatingVector &operator=(DeallocatingVector &other) = delete; | ||||
| 
 | ||||
|     DeallocatingVector(DeallocatingVector &&other) | ||||
|     { | ||||
|         bucket_list = std::move(other.bucket_list); | ||||
|         current_size = std::move(other.current_size); | ||||
|     } | ||||
| 
 | ||||
|     DeallocatingVector &operator=(DeallocatingVector &&other) | ||||
|     { | ||||
|         bucket_list = std::move(other.bucket_list); | ||||
|         current_size = std::move(other.current_size); | ||||
|         return *this; | ||||
|     } | ||||
|     // moving is fine
 | ||||
|     DeallocatingVector(DeallocatingVector &&other) = default; | ||||
|     DeallocatingVector &operator=(DeallocatingVector &&other) = default; | ||||
| 
 | ||||
|     ~DeallocatingVector() { clear(); } | ||||
| 
 | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user