diff options
author | bunnei <bunneidev@gmail.com> | 2022-10-29 10:46:24 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2022-11-04 05:17:06 +0100 |
commit | 46322be735520e737e7b555a6bc504f55ef6a485 (patch) | |
tree | 4250890214b4cfab5ca90e8f1af0c27fba033f12 /src/core/hle | |
parent | Merge pull request #9154 from liamwhite/new-fb (diff) | |
download | yuzu-46322be735520e737e7b555a6bc504f55ef6a485.tar yuzu-46322be735520e737e7b555a6bc504f55ef6a485.tar.gz yuzu-46322be735520e737e7b555a6bc504f55ef6a485.tar.bz2 yuzu-46322be735520e737e7b555a6bc504f55ef6a485.tar.lz yuzu-46322be735520e737e7b555a6bc504f55ef6a485.tar.xz yuzu-46322be735520e737e7b555a6bc504f55ef6a485.tar.zst yuzu-46322be735520e737e7b555a6bc504f55ef6a485.zip |
Diffstat (limited to 'src/core/hle')
-rw-r--r-- | src/core/hle/result.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/core/hle/result.h b/src/core/hle/result.h index ef4b2d417..56c990728 100644 --- a/src/core/hle/result.h +++ b/src/core/hle/result.h @@ -423,16 +423,17 @@ constexpr void UpdateCurrentResultReference<const Result>(Result result_referenc } // namespace ResultImpl #define DECLARE_CURRENT_RESULT_REFERENCE_AND_STORAGE(COUNTER_VALUE) \ - [[maybe_unused]] constexpr bool HasPrevRef_##COUNTER_VALUE = \ + [[maybe_unused]] constexpr bool CONCAT2(HasPrevRef_, COUNTER_VALUE) = \ std::same_as<decltype(__TmpCurrentResultReference), Result&>; \ - [[maybe_unused]] auto& PrevRef_##COUNTER_VALUE = __TmpCurrentResultReference; \ - [[maybe_unused]] Result __tmp_result_##COUNTER_VALUE = ResultSuccess; \ - Result& __TmpCurrentResultReference = \ - HasPrevRef_##COUNTER_VALUE ? PrevRef_##COUNTER_VALUE : __tmp_result_##COUNTER_VALUE + [[maybe_unused]] Result CONCAT2(PrevRef_, COUNTER_VALUE) = __TmpCurrentResultReference; \ + [[maybe_unused]] Result CONCAT2(__tmp_result_, COUNTER_VALUE) = ResultSuccess; \ + Result& __TmpCurrentResultReference = CONCAT2(HasPrevRef_, COUNTER_VALUE) \ + ? CONCAT2(PrevRef_, COUNTER_VALUE) \ + : CONCAT2(__tmp_result_, COUNTER_VALUE) #define ON_RESULT_RETURN_IMPL(...) \ static_assert(std::same_as<decltype(__TmpCurrentResultReference), Result&>); \ - auto RESULT_GUARD_STATE_##__COUNTER__ = \ + auto CONCAT2(RESULT_GUARD_STATE_, __COUNTER__) = \ ResultImpl::ResultReferenceForScopedResultGuard<__VA_ARGS__>( \ __TmpCurrentResultReference) + \ [&]() |