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