[ox/std] Fix error handling for Result::copyTo
This commit is contained in:
parent
cdc7428eb6
commit
9cc27f5be9
4
deps/ox/src/ox/std/error.hpp
vendored
4
deps/ox/src/ox/std/error.hpp
vendored
@ -180,7 +180,9 @@ struct [[nodiscard]] Result {
|
||||
}
|
||||
|
||||
constexpr Error copyTo(type &val) & noexcept {
|
||||
*val = value;
|
||||
if (!error) [[likely]] {
|
||||
*val = value;
|
||||
}
|
||||
return error;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user