C++20 Port #5
| @ -478,7 +478,7 @@ export namespace coral { | ||||
| 	 * *Note*: safety-checked behavior is triggered if `target` is smaller than `origin`. | ||||
| 	 */ | ||||
| 	void copy(slice<u8> const & target, slice<u8 const> const & origin) { | ||||
| 		if (target.length < origin.length) coral::unreachable(); | ||||
| 		if (target.length < origin.length) unreachable(); | ||||
| 
 | ||||
| 		for (usize i = 0; i < origin.length; i += 1) target[i] = origin[i]; | ||||
| 	} | ||||
|  | ||||
| @ -179,7 +179,7 @@ export namespace coral { | ||||
| 					return append_result::out_of_memory; | ||||
| 				} | ||||
| 
 | ||||
| 				coral::copy({buffer, buffer_size}, this->elements.as_bytes()); | ||||
| 				copy({buffer, buffer_size}, this->elements.as_bytes()); | ||||
| 
 | ||||
| 				this->elements = {reinterpret_cast<element *>(buffer), requested_capacity}; | ||||
| 			} | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user