Merge branch 'clang-no-rtti'
Fix wxGTK compilation without RTTI and clang-related no-rtti fixes. See https://github.com/wxWidgets/wxWidgets/pull/1266
This commit is contained in:
@@ -611,7 +611,11 @@
|
||||
Only 4.3 defines __GXX_RTTI by default so its absence is not an
|
||||
indication of disabled RTTI with the previous versions.
|
||||
*/
|
||||
# if wxCHECK_GCC_VERSION(4, 3)
|
||||
# if defined(__clang__)
|
||||
# if !__has_feature(cxx_rtti)
|
||||
# define wxNO_RTTI
|
||||
# endif
|
||||
# elif wxCHECK_GCC_VERSION(4, 3)
|
||||
# ifndef __GXX_RTTI
|
||||
# define wxNO_RTTI
|
||||
# endif
|
||||
|
@@ -106,7 +106,7 @@ typedef void (*wxTypeIdentifier)();
|
||||
// WX_DECLARE_TYPEINFO() or WX_DECLARE_TYPEINFO_INLINE() however.
|
||||
#define _WX_DECLARE_TYPEINFO_CUSTOM(CLS, IDENTFUNC) \
|
||||
public: \
|
||||
virtual wxTypeIdentifier GetWxTypeId() const \
|
||||
virtual wxTypeIdentifier GetWxTypeId() const wxOVERRIDE \
|
||||
{ \
|
||||
return reinterpret_cast<wxTypeIdentifier> \
|
||||
(&IDENTFUNC); \
|
||||
|
@@ -1750,6 +1750,15 @@ struct wxGridCellDateEditorKeyHandler
|
||||
}
|
||||
|
||||
wxGridCellEditorEvtHandler* m_handler;
|
||||
|
||||
#ifdef wxNO_RTTI
|
||||
// wxEventFunctorFunction used when an object of this class is passed to
|
||||
// Bind() must have a default ctor when using wx RTTI implementation (see
|
||||
// see the comment before WX_DECLARE_TYPEINFO_INLINE() in wx/typeinfo.h)
|
||||
// and this, in turn, requires a default ctor of this class -- which will
|
||||
// never be actually used, but must nevertheless exist.
|
||||
wxGridCellDateEditorKeyHandler() : m_handler(NULL) { }
|
||||
#endif // wxNO_RTTI
|
||||
};
|
||||
#endif // __WXGTK__
|
||||
|
||||
|
Reference in New Issue
Block a user