From d5220b327632a8aeeb9a89494bb37bd82fec30cb Mon Sep 17 00:00:00 2001 From: James0124 Date: Wed, 23 Apr 2025 03:08:27 +0900 Subject: Add SLANG_OVERRIDE to SLANG_IUNKNOWN_ macros (#6864) --- include/slang-com-helper.h | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/include/slang-com-helper.h b/include/slang-com-helper.h index 557b278df..cc36b6de9 100644 --- a/include/slang-com-helper.h +++ b/include/slang-com-helper.h @@ -139,22 +139,22 @@ SLANG_FORCE_INLINE bool operator!=(const Slang::Guid& a, const Slang::Guid& b) return SLANG_E_NO_INTERFACE; \ } - #define SLANG_IUNKNOWN_ADD_REF \ - SLANG_NO_THROW uint32_t SLANG_MCALL addRef() \ - { \ - return ++m_refCount; \ + #define SLANG_IUNKNOWN_ADD_REF \ + SLANG_NO_THROW uint32_t SLANG_MCALL addRef() SLANG_OVERRIDE \ + { \ + return ++m_refCount; \ } - #define SLANG_IUNKNOWN_RELEASE \ - SLANG_NO_THROW uint32_t SLANG_MCALL release() \ - { \ - --m_refCount; \ - if (m_refCount == 0) \ - { \ - delete this; \ - return 0; \ - } \ - return m_refCount; \ + #define SLANG_IUNKNOWN_RELEASE \ + SLANG_NO_THROW uint32_t SLANG_MCALL release() SLANG_OVERRIDE \ + { \ + --m_refCount; \ + if (m_refCount == 0) \ + { \ + delete this; \ + return 0; \ + } \ + return m_refCount; \ } #define SLANG_IUNKNOWN_ALL \ -- cgit v1.2.3