X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0bf14ab8b14d3a999fe1159d2bec33740e066a53..ff46415213f7435aa64ab4f5b7dfdbb7b31f3796:/include/wx/variant.h diff --git a/include/wx/variant.h b/include/wx/variant.h index 2f54c1b404..671db18c65 100644 --- a/include/wx/variant.h +++ b/include/wx/variant.h @@ -376,6 +376,7 @@ class WXDLLIMPEXP_BASE wxAnyToVariantRegistration { public: wxAnyToVariantRegistration(wxVariantDataFactory factory); + virtual ~wxAnyToVariantRegistration(); virtual wxAnyValueType* GetAssociatedType() = 0; wxVariantDataFactory GetFactory() const { return m_factory; } @@ -403,10 +404,13 @@ private: virtual bool GetAsAny(wxAny* any) const; \ static wxVariantData* VariantDataFactory(const wxAny& any); -#define REGISTER_WXANY_CONVERSION(T, CLASSNAME) \ +#define _REGISTER_WXANY_CONVERSION(T, CLASSNAME, FUNC) \ static wxAnyToVariantRegistrationImpl \ gs_##CLASSNAME##AnyToVariantRegistration = \ - wxAnyToVariantRegistrationImpl(&CLASSNAME::VariantDataFactory); + wxAnyToVariantRegistrationImpl(&FUNC); + +#define REGISTER_WXANY_CONVERSION(T, CLASSNAME) \ +_REGISTER_WXANY_CONVERSION(T, CLASSNAME, CLASSNAME::VariantDataFactory) #define IMPLEMENT_TRIVIAL_WXANY_CONVERSION(T, CLASSNAME) \ bool CLASSNAME::GetAsAny(wxAny* any) const \