mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-26 19:33:31 +00:00
[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();
| ^~~~~~~~
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user