[ox/std] Fix Result::copyTo
This commit is contained in:
parent
9cc27f5be9
commit
30909f85a3
8
deps/ox/src/ox/std/error.hpp
vendored
8
deps/ox/src/ox/std/error.hpp
vendored
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user