From cb09ea0f0174162a85f47fdb8446b397c3c57e20 Mon Sep 17 00:00:00 2001 From: Morph <39850852+Morph1984@users.noreply.github.com> Date: Tue, 2 Nov 2021 17:23:19 -0400 Subject: general: Remove MakeResult helpers This is made obsolete by the presence of implicit constructors. --- src/core/hle/result.h | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) (limited to 'src/core/hle/result.h') diff --git a/src/core/hle/result.h b/src/core/hle/result.h index a1917d32b..3807b9aa8 100644 --- a/src/core/hle/result.h +++ b/src/core/hle/result.h @@ -168,7 +168,7 @@ constexpr ResultCode ResultUnknown(UINT32_MAX); * return ResultCode{ErrorModule::Common, 1}; * } else { * // Frobnicated! Give caller a cookie - * return MakeResult(42); + * return 42; * } * } * \endcode @@ -279,24 +279,6 @@ private: Common::Expected expected; }; -/** - * This function is a helper used to construct `ResultVal`s. It receives the arguments to construct - * `T` with and creates a `ResultVal` that contains the constructed value. - */ -template -[[nodiscard]] ResultVal MakeResult(Args&&... args) { - return ResultVal{std::forward(args)...}; -} - -/** - * Deducible overload of MakeResult, allowing the template parameter to be ommited if you're just - * copy or move constructing. - */ -template -[[nodiscard]] ResultVal> MakeResult(T&& val) { - return ResultVal>{std::forward(val)}; -} - /** * Check for the success of `source` (which must evaluate to a ResultVal). If it succeeds, unwraps * the contained value and assigns it to `target`, which can be either an l-value expression or a -- cgit v1.2.3