From 133447a105fb57ded306f10d9b67ea7b83069cc8 Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Mon, 25 Dec 2023 00:54:59 -0600 Subject: [PATCH] [ox/std] Cleanup Result::copyTo variants (synced from e941781f21332fa1f9998631a03005acb70a7b04) --- src/ox/std/error.hpp | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/src/ox/std/error.hpp b/src/ox/std/error.hpp index 4b54906f7..49da4980d 100644 --- a/src/ox/std/error.hpp +++ b/src/ox/std/error.hpp @@ -165,21 +165,7 @@ struct [[nodiscard]] Result { return error == 0; } - constexpr Error copyTo(type &val) const & noexcept { - if (!error) [[likely]] { - val = value; - } - return error; - } - - constexpr Error copyTo(type &val) const && noexcept { - if (!error) [[likely]] { - val = value; - } - return error; - } - - constexpr Error copyTo(type &val) & noexcept { + constexpr Error copyTo(type &val) const& noexcept { if (!error) [[likely]] { val = value; }