Fix wx/event.h compilation with Sun CC compiler.
Move wxObjectEventFunctor::operator() definition after wxEvtHandler declaration as it uses call through a pointer to member of this class and Sun CC refuses to compile this without having the full class declaration. Closes #12452. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65658 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
0b2a860f0d
commit
8cb2c49f7d
@ -215,12 +215,7 @@ public:
|
|||||||
: m_handler( handler ), m_method( method )
|
: m_handler( handler ), m_method( method )
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
virtual void operator()(wxEvtHandler *handler, wxEvent& event)
|
virtual void operator()(wxEvtHandler *handler, wxEvent& event);
|
||||||
{
|
|
||||||
wxEvtHandler * const realHandler = m_handler ? m_handler : handler;
|
|
||||||
|
|
||||||
(realHandler->*m_method)(event);
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual bool IsMatching(const wxEventFunctor& functor) const
|
virtual bool IsMatching(const wxEventFunctor& functor) const
|
||||||
{
|
{
|
||||||
@ -3339,6 +3334,17 @@ private:
|
|||||||
|
|
||||||
WX_DEFINE_ARRAY_WITH_DECL_PTR(wxEvtHandler *, wxEvtHandlerArray, class WXDLLIMPEXP_BASE);
|
WX_DEFINE_ARRAY_WITH_DECL_PTR(wxEvtHandler *, wxEvtHandlerArray, class WXDLLIMPEXP_BASE);
|
||||||
|
|
||||||
|
|
||||||
|
// Define an inline method of wxObjectEventFunctor which couldn't be defined
|
||||||
|
// before wxEvtHandler declaration: at least Sun CC refuses to compile function
|
||||||
|
// calls through pointer to member for forward-declared classes (see #12452).
|
||||||
|
inline void wxObjectEventFunctor::operator()(wxEvtHandler *handler, wxEvent& event)
|
||||||
|
{
|
||||||
|
wxEvtHandler * const realHandler = m_handler ? m_handler : handler;
|
||||||
|
|
||||||
|
(realHandler->*m_method)(event);
|
||||||
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// wxEventConnectionRef represents all connections between two event handlers
|
// wxEventConnectionRef represents all connections between two event handlers
|
||||||
// and enables automatic disconnect when an event handler sink goes out of
|
// and enables automatic disconnect when an event handler sink goes out of
|
||||||
|
Loading…
Reference in New Issue
Block a user