diff options
author | Edoardo Lolletti <[email protected]> | 2022-07-18 03:11:32 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2022-07-17 18:11:32 -0700 |
commit | e28a49363e44ef803c00d6bce7dc50792ae0a60c (patch) | |
tree | 8b9b99381f5e8247741d2ae1098ad82206bd3ac4 /al/eax/api.h | |
parent | c6064a2034d7814758d44659a9b97c9a0ec0e1aa (diff) |
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
Diffstat (limited to 'al/eax/api.h')
-rw-r--r-- | al/eax/api.h | 3 |
1 files changed, 3 insertions, 0 deletions
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 |