Use wxEVENT_HANDLER_CAST() in socket sample
This macro avoids a -Wcast-function-type from gcc 8+.
This commit is contained in:
parent
008e72c3ac
commit
4040e35f41
2 changed files with 2 additions and 2 deletions
|
|
@ -27,7 +27,7 @@
|
|||
#include "wx/thread.h"
|
||||
|
||||
const wxEventType wxEVT_WORKER = wxNewEventType();
|
||||
#define EVT_WORKER(func) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_WORKER, -1, -1, (wxObjectEventFunction) (wxEventFunction) (WorkerEventFunction) & func, (wxObject *) nullptr ),
|
||||
#define EVT_WORKER(func) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_WORKER, -1, -1, wxEVENT_HANDLER_CAST(WorkerEventFunction, func), (wxObject *) nullptr ),
|
||||
|
||||
const int timeout_val = 1000;
|
||||
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ const char *GetSocketErrorMsg(int pSockError)
|
|||
//event sent by workers to server class
|
||||
//after client is served
|
||||
const wxEventType wxEVT_WORKER = wxNewEventType();
|
||||
#define EVT_WORKER(func) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_WORKER, -1, -1, (wxObjectEventFunction) (wxEventFunction) (WorkerEventFunction) & func, (wxObject *) nullptr ),
|
||||
#define EVT_WORKER(func) wxDECLARE_EVENT_TABLE_ENTRY( wxEVT_WORKER, -1, -1, wxEVENT_HANDLER_CAST(WorkerEventFunction, func), (wxObject *) nullptr ),
|
||||
|
||||
class WorkerEvent : public wxEvent
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue