diff options
author | Morph <39850852+Morph1984@users.noreply.github.com> | 2021-05-21 07:05:04 +0200 |
---|---|---|
committer | Morph <39850852+Morph1984@users.noreply.github.com> | 2021-06-02 06:39:27 +0200 |
commit | 12c1766997f2596b4b1b1a6a411e4f6d56605ee7 (patch) | |
tree | e718a0f18be8aaf664ebdcd197af513e5a118b72 /src/core/hle/result.h | |
parent | Merge pull request #6395 from lioncash/result-move (diff) | |
download | yuzu-12c1766997f2596b4b1b1a6a411e4f6d56605ee7.tar yuzu-12c1766997f2596b4b1b1a6a411e4f6d56605ee7.tar.gz yuzu-12c1766997f2596b4b1b1a6a411e4f6d56605ee7.tar.bz2 yuzu-12c1766997f2596b4b1b1a6a411e4f6d56605ee7.tar.lz yuzu-12c1766997f2596b4b1b1a6a411e4f6d56605ee7.tar.xz yuzu-12c1766997f2596b4b1b1a6a411e4f6d56605ee7.tar.zst yuzu-12c1766997f2596b4b1b1a6a411e4f6d56605ee7.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/result.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/core/hle/result.h b/src/core/hle/result.h index df3283fe3..9ec124cf4 100644 --- a/src/core/hle/result.h +++ b/src/core/hle/result.h @@ -144,7 +144,7 @@ constexpr bool operator!=(const ResultCode& a, const ResultCode& b) { // Convenience functions for creating some common kinds of errors: /// The default success `ResultCode`. -constexpr ResultCode RESULT_SUCCESS(0); +constexpr ResultCode ResultSuccess(0); /** * Placeholder result code used for unknown error codes. @@ -321,7 +321,7 @@ private: */ template <typename T, typename... Args> ResultVal<T> MakeResult(Args&&... args) { - return ResultVal<T>::WithCode(RESULT_SUCCESS, std::forward<Args>(args)...); + return ResultVal<T>::WithCode(ResultSuccess, std::forward<Args>(args)...); } /** @@ -330,8 +330,7 @@ ResultVal<T> MakeResult(Args&&... args) { */ template <typename Arg> ResultVal<std::remove_reference_t<Arg>> MakeResult(Arg&& arg) { - return ResultVal<std::remove_reference_t<Arg>>::WithCode(RESULT_SUCCESS, - std::forward<Arg>(arg)); + return ResultVal<std::remove_reference_t<Arg>>::WithCode(ResultSuccess, std::forward<Arg>(arg)); } /** @@ -362,7 +361,7 @@ ResultVal<std::remove_reference_t<Arg>> MakeResult(Arg&& arg) { #define R_SUCCEEDED(res) (res.IsSuccess()) /// Evaluates a boolean expression, and succeeds if that expression is true. -#define R_SUCCEED_IF(expr) R_UNLESS(!(expr), RESULT_SUCCESS) +#define R_SUCCEED_IF(expr) R_UNLESS(!(expr), ResultSuccess) /// Evaluates a boolean expression, and returns a result unless that expression is true. #define R_UNLESS(expr, res) \ |