summaryrefslogtreecommitdiff
path: root/src/core/hle/result.h
diff options
context:
space:
mode:
authorGravatar bunnei2022-10-29 01:46:24 -0700
committerGravatar bunnei2022-11-03 21:17:06 -0700
commit46322be735520e737e7b555a6bc504f55ef6a485 (patch)
tree4250890214b4cfab5ca90e8f1af0c27fba033f12 /src/core/hle/result.h
parentMerge pull request #9154 from liamwhite/new-fb (diff)
downloadyuzu-46322be735520e737e7b555a6bc504f55ef6a485.tar.gz
yuzu-46322be735520e737e7b555a6bc504f55ef6a485.tar.xz
yuzu-46322be735520e737e7b555a6bc504f55ef6a485.zip
core: hle: result: Fix code for compilers.
Diffstat (limited to 'src/core/hle/result.h')
-rw-r--r--src/core/hle/result.h13
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
423} // namespace ResultImpl 423} // namespace ResultImpl
424 424
425#define DECLARE_CURRENT_RESULT_REFERENCE_AND_STORAGE(COUNTER_VALUE) \ 425#define DECLARE_CURRENT_RESULT_REFERENCE_AND_STORAGE(COUNTER_VALUE) \
426 [[maybe_unused]] constexpr bool HasPrevRef_##COUNTER_VALUE = \ 426 [[maybe_unused]] constexpr bool CONCAT2(HasPrevRef_, COUNTER_VALUE) = \
427 std::same_as<decltype(__TmpCurrentResultReference), Result&>; \ 427 std::same_as<decltype(__TmpCurrentResultReference), Result&>; \
428 [[maybe_unused]] auto& PrevRef_##COUNTER_VALUE = __TmpCurrentResultReference; \ 428 [[maybe_unused]] Result CONCAT2(PrevRef_, COUNTER_VALUE) = __TmpCurrentResultReference; \
429 [[maybe_unused]] Result __tmp_result_##COUNTER_VALUE = ResultSuccess; \ 429 [[maybe_unused]] Result CONCAT2(__tmp_result_, COUNTER_VALUE) = ResultSuccess; \
430 Result& __TmpCurrentResultReference = \ 430 Result& __TmpCurrentResultReference = CONCAT2(HasPrevRef_, COUNTER_VALUE) \
431 HasPrevRef_##COUNTER_VALUE ? PrevRef_##COUNTER_VALUE : __tmp_result_##COUNTER_VALUE 431 ? CONCAT2(PrevRef_, COUNTER_VALUE) \
432 : CONCAT2(__tmp_result_, COUNTER_VALUE)
432 433
433#define ON_RESULT_RETURN_IMPL(...) \ 434#define ON_RESULT_RETURN_IMPL(...) \
434 static_assert(std::same_as<decltype(__TmpCurrentResultReference), Result&>); \ 435 static_assert(std::same_as<decltype(__TmpCurrentResultReference), Result&>); \
435 auto RESULT_GUARD_STATE_##__COUNTER__ = \ 436 auto CONCAT2(RESULT_GUARD_STATE_, __COUNTER__) = \
436 ResultImpl::ResultReferenceForScopedResultGuard<__VA_ARGS__>( \ 437 ResultImpl::ResultReferenceForScopedResultGuard<__VA_ARGS__>( \
437 __TmpCurrentResultReference) + \ 438 __TmpCurrentResultReference) + \
438 [&]() 439 [&]()