[ox/std] Fix Result::copyTo

This commit is contained in:
Gary Talent 2023-12-14 22:33:03 -06:00
parent 9cc27f5be9
commit 30909f85a3

View File

@ -167,28 +167,28 @@ struct [[nodiscard]] Result {
constexpr Error copyTo(type &val) const & noexcept {
if (!error) [[likely]] {
*val = value;
val = value;
}
return error;
}
constexpr Error copyTo(type &val) const && noexcept {
if (!error) [[likely]] {
*val = value;
val = value;
}
return error;
}
constexpr Error copyTo(type &val) & noexcept {
if (!error) [[likely]] {
*val = value;
val = value;
}
return error;
}
constexpr Error copyTo(type &val) && noexcept {
if (!error) [[likely]] {
*val = std::move(value);
val = std::move(value);
}
return error;
}