From d31b043fff1479030509f6b508016758026ca0b5 Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Sat, 21 Feb 2026 15:33:38 +0200 Subject: [PATCH] [VCRUNTIME] comutil.h: Remove redundant _variant_t::operator VARIANT() _variant_t inherits from tagVARIANT aka VARIANT and C++ will always prioritize the built-in conversion to the base class over the use of a user-defined conversion operator. Fixes GCC 13 warning: In file included from C:/ReactOS/reactos/sdk/include/vcruntime/comdef.h:19, from C:/ReactOS/reactos/sdk/lib/comsupp/comsupp.cpp:16: C:/ReactOS/reactos/sdk/include/vcruntime/comutil.h:423:3: error: converting '_variant_t' to a base class 'VARIANT' {aka 'tagVARIANT'} will never use a type conversion operator [-Werror=class-conversion] 423 | operator VARIANT() const throw(); | ^~~~~~~~ --- sdk/include/vcruntime/comutil.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/sdk/include/vcruntime/comutil.h b/sdk/include/vcruntime/comutil.h index a929d977840..971b9f04640 100644 --- a/sdk/include/vcruntime/comutil.h +++ b/sdk/include/vcruntime/comutil.h @@ -420,7 +420,6 @@ public: operator IUnknown*() const; operator DECIMAL() const; operator BYTE() const; - operator VARIANT() const throw(); operator char() const; operator unsigned short() const; operator unsigned long() const; @@ -688,7 +687,6 @@ inline _variant_t::operator BYTE() const { varDest.ChangeType(VT_UI1,this); return V_UI1(&varDest); } -inline _variant_t::operator VARIANT() const throw() { return *(VARIANT*) this; } inline _variant_t::operator char() const { if(V_VT(this)==VT_I1) return V_I1(this); _variant_t varDest;