[ox/std] Fix error handling for Result::copyTo

This commit is contained in:
Gary Talent 2023-12-14 22:28:16 -06:00
parent cdc7428eb6
commit 9cc27f5be9

View File

@ -180,7 +180,9 @@ struct [[nodiscard]] Result {
} }
constexpr Error copyTo(type &val) & noexcept { constexpr Error copyTo(type &val) & noexcept {
*val = value; if (!error) [[likely]] {
*val = value;
}
return error; return error;
} }