[ox/std] Fix Result::moveTo to not move if error
This commit is contained in:
		
							
								
								
									
										2
									
								
								deps/ox/src/ox/std/error.hpp
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								deps/ox/src/ox/std/error.hpp
									
									
									
									
										vendored
									
									
								
							| @@ -174,7 +174,9 @@ struct [[nodiscard]] Result { | |||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	constexpr Error moveTo(type *val) noexcept { | 	constexpr Error moveTo(type *val) noexcept { | ||||||
|  | 		if (!error) [[likely]] { | ||||||
| 			*val = std::move(value); | 			*val = std::move(value); | ||||||
|  | 		} | ||||||
| 		return error; | 		return error; | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user