From 1bce8984169f736fe869a6c8f1f3b6e228ef3d77 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 (synced from 30909f85a39183792faab45839035914a5b0a343) --- src/ox/std/error.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ox/std/error.hpp b/src/ox/std/error.hpp index 2eb3cbc95..ecfbec13b 100644 --- a/src/ox/std/error.hpp +++ b/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; }