Suppress warning in tests checking legacy Connect()
This code can't be modified as it tests for compatibility with the existing code of this form, so just disable the warnings it now triggers with -Wextra.
This commit is contained in:
parent
9952af8e93
commit
b6d082a7a6
1 changed files with 5 additions and 2 deletions
|
|
@ -165,10 +165,13 @@ TEST_CASE("Event::BuiltinConnect", "[event][connect]")
|
|||
handler.Connect(wxEVT_IDLE, wxIdleEventHandler(MyHandler::OnIdle), nullptr, &handler);
|
||||
handler.Disconnect(wxEVT_IDLE, wxIdleEventHandler(MyHandler::OnIdle), nullptr, &handler);
|
||||
|
||||
// using casts like this is even uglier than using wxIdleEventHandler but
|
||||
// it should still continue to work for compatibility
|
||||
// using casts like this is even uglier than using wxIdleEventHandler and
|
||||
// results in warnings with gcc, but it should still continue to work for
|
||||
// compatibility
|
||||
wxGCC_WARNING_SUPPRESS_CAST_FUNCTION_TYPE()
|
||||
handler.Connect(wxEVT_IDLE, (wxObjectEventFunction)(wxEventFunction)&MyHandler::OnIdle);
|
||||
handler.Disconnect(wxEVT_IDLE, (wxObjectEventFunction)(wxEventFunction)&MyHandler::OnIdle);
|
||||
wxGCC_WARNING_RESTORE_CAST_FUNCTION_TYPE()
|
||||
|
||||
handler.Bind(wxEVT_IDLE, GlobalOnIdle);
|
||||
handler.Unbind(wxEVT_IDLE, GlobalOnIdle);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue