From e28a49363e44ef803c00d6bce7dc50792ae0a60c Mon Sep 17 00:00:00 2001 From: Edoardo Lolletti Date: Mon, 18 Jul 2022 03:11:32 +0200 Subject: Fix possible C2084 compiler error (#735) * Fix possible C2084 compiler error Guiddef.h uses a separate header guard to define the GUID operators, in the current codebase this won't cause any issue, but i got such error while fiddling a bit with the program and including something that ended up including all the various windows headers, that ended up including Guiddef.h, causing the error as by not finding the macro declared, it ended up declaring the inline operators as well. * Update api.h --- al/eax/api.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'al/eax/api.h') diff --git a/al/eax/api.h b/al/eax/api.h index 3d78c90b..d254da1f 100644 --- a/al/eax/api.h +++ b/al/eax/api.h @@ -28,11 +28,14 @@ typedef struct _GUID { std::uint8_t Data4[8]; } GUID; +#ifndef _SYS_GUID_OPERATOR_EQ_ +#define _SYS_GUID_OPERATOR_EQ_ inline bool operator==(const GUID& lhs, const GUID& rhs) noexcept { return std::memcmp(&lhs, &rhs, sizeof(GUID)) == 0; } inline bool operator!=(const GUID& lhs, const GUID& rhs) noexcept { return !(lhs == rhs); } +#endif // _SYS_GUID_OPERATOR_EQ_ #endif // GUID_DEFINED -- cgit v1.2.3