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:
Jan van Dijk 2015-06-03 17:11:29 +02:00 committed by Vadim Zeitlin
parent 72a4c3a4d0
commit d2c1fce24e

View File

@ -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 \
{ \