Allow wxAny to contain 'const char*' or 'const wchar_t*'. This was previously not possible since these pointers were converted to wxString, as convenient means to work with string literals. Now pointers (to string literals) are stored instead, and As<wxString>(), comparison operators do the type conversion.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64106 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -404,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<T> \
|
||||
gs_##CLASSNAME##AnyToVariantRegistration = \
|
||||
wxAnyToVariantRegistrationImpl<T>(&CLASSNAME::VariantDataFactory);
|
||||
wxAnyToVariantRegistrationImpl<T>(&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 \
|
||||
|
Reference in New Issue
Block a user