diff options
| author | liamwhite <liamwhite@users.noreply.github.com> | 2022-11-05 13:25:29 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-05 13:25:29 -0400 |
| commit | 4c198bbf06fe7b72d4718cf3571e99b6169e9f47 (patch) | |
| tree | 3f091be57ce7198ee53b721b160a454ef6dee913 /src/core/hle/result.h | |
| parent | 8baf036cdc1c7b8bc1e6692b4e896cf4cbc6ae6d (diff) | |
| parent | cf0f821565570314c7a47ba332774f4d4c0fff71 (diff) | |
Merge pull request #9173 from bunnei/kern-update-15
Kernel: Various updates for FW 15.0.x
Diffstat (limited to 'src/core/hle/result.h')
| -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) + \ [&]() |
