yuzu-emu
/
yuzu-android
Archived
1
0
Fork 0

Merge pull request #9065 from liamwhite/result-mess

result: enforce reference check specialization
This commit is contained in:
Mai 2022-10-13 19:54:10 +00:00 committed by GitHub
commit e37d00332c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 4 deletions

View File

@ -402,9 +402,8 @@ constexpr bool EvaluateResultFailure(const Result& r) {
} }
template <typename T> template <typename T>
constexpr void UpdateCurrentResultReference(T result_reference, Result result) { constexpr void UpdateCurrentResultReference(T result_reference, Result result) = delete;
ASSERT(false); // Intentionally not defined
}
template <> template <>
constexpr void UpdateCurrentResultReference<Result&>(Result& result_reference, Result result) { constexpr void UpdateCurrentResultReference<Result&>(Result& result_reference, Result result) {
@ -412,7 +411,7 @@ constexpr void UpdateCurrentResultReference<Result&>(Result& result_reference, R
} }
template <> template <>
constexpr void UpdateCurrentResultReference<Result>(Result result_reference, Result result) {} constexpr void UpdateCurrentResultReference<const Result>(Result result_reference, Result result) {}
} // namespace ResultImpl } // namespace ResultImpl
#define DECLARE_CURRENT_RESULT_REFERENCE_AND_STORAGE(COUNTER_VALUE) \ #define DECLARE_CURRENT_RESULT_REFERENCE_AND_STORAGE(COUNTER_VALUE) \