remove wxNewEventFunctor() overload which allowed calls to "Bind(evt, &WrongClass::method)" to compile
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60212 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -78,7 +78,7 @@ typedef int wxEventType;
|
|||||||
#define wxStaticCastEvent(type, val) static_cast<type>(val)
|
#define wxStaticCastEvent(type, val) static_cast<type>(val)
|
||||||
|
|
||||||
#define DECLARE_EVENT_TABLE_ENTRY(type, winid, idLast, fn, obj) \
|
#define DECLARE_EVENT_TABLE_ENTRY(type, winid, idLast, fn, obj) \
|
||||||
wxEventTableEntry(type, winid, idLast, wxNewEventFunctor(type, fn), obj)
|
wxEventTableEntry(type, winid, idLast, wxNewEventTableFunctor(type, fn), obj)
|
||||||
|
|
||||||
#define DECLARE_EVENT_TABLE_TERMINATOR() \
|
#define DECLARE_EVENT_TABLE_TERMINATOR() \
|
||||||
wxEventTableEntry(wxEVT_NULL, 0, 0, 0, 0)
|
wxEventTableEntry(wxEVT_NULL, 0, 0, 0, 0)
|
||||||
@@ -507,25 +507,17 @@ wxMakeEventFunctor(const EventTag&,
|
|||||||
method, handler);
|
method, handler);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Special case for the wxNewEventFunctor() calls used inside the event table
|
// Create an event functor for the event table via DECLARE_EVENT_TABLE_ENTRY:
|
||||||
// macros: they don't specify the handler so EventHandler can't be deduced
|
// in this case we don't have the handler (as it's always the same as the
|
||||||
|
// object which generated the event) so we must use Class as its type
|
||||||
template <typename EventTag, typename Class, typename EventArg>
|
template <typename EventTag, typename Class, typename EventArg>
|
||||||
inline wxEventFunctorMethod<EventTag, Class, EventArg, Class> *
|
inline wxEventFunctorMethod<EventTag, Class, EventArg, Class> *
|
||||||
wxNewEventFunctor(const EventTag&, void (Class::*method)(EventArg&))
|
wxNewEventTableFunctor(const EventTag&, void (Class::*method)(EventArg&))
|
||||||
{
|
{
|
||||||
return new wxEventFunctorMethod<EventTag, Class, EventArg, Class>(
|
return new wxEventFunctorMethod<EventTag, Class, EventArg, Class>(
|
||||||
method, NULL);
|
method, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
template
|
|
||||||
<typename EventTag, typename Class, typename EventArg, typename EventHandler>
|
|
||||||
inline wxEventFunctorMethod<EventTag, Class, EventArg, Class>
|
|
||||||
wxMakeEventFunctor(const EventTag&, void (Class::*method)(EventArg&))
|
|
||||||
{
|
|
||||||
return wxEventFunctorMethod<EventTag, Class, EventArg, Class>(
|
|
||||||
method, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif // !wxEVENTS_COMPATIBILITY_2_8
|
#endif // !wxEVENTS_COMPATIBILITY_2_8
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user