From 30909f85a39183792faab45839035914a5b0a343 Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Thu, 14 Dec 2023 22:33:03 -0600 Subject: [PATCH] [ox/std] Fix Result::copyTo --- deps/ox/src/ox/std/error.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/deps/ox/src/ox/std/error.hpp b/deps/ox/src/ox/std/error.hpp index 2eb3cbc9..ecfbec13 100644 --- a/deps/ox/src/ox/std/error.hpp +++ b/deps/ox/src/ox/std/error.hpp @@ -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; }