Further work around for clang warnings about typeid() side effects.
Apparently in some versions of the compiler even simply dereferencing a pointer inside typeid() still provokes -Wpotentially-evaluated-expression. Avoid this by dereferencing it outside and only using typeid() with references. Closes #16968.
This commit is contained in:
parent
72a4c3a4d0
commit
d2c1fce24e
@ -159,8 +159,9 @@ private:
|
||||
public: \
|
||||
static bool IsSameClass(const wxAnyValueType* otherType) \
|
||||
{ \
|
||||
const wxAnyValueType* const inst = sm_instance.get(); \
|
||||
return wxTypeId(*inst) == wxTypeId(*otherType); \
|
||||
const wxAnyValueType& inst = *sm_instance.get(); \
|
||||
const wxAnyValueType& otherRef = *otherType; \
|
||||
return wxTypeId(inst) == wxTypeId(otherRef); \
|
||||
} \
|
||||
virtual bool IsSameType(const wxAnyValueType* otherType) const \
|
||||
{ \
|
||||
|
Loading…
Reference in New Issue
Block a user