Stop passing WNDPROC argument to wxCheckWindowWndProc()

This parameter wasn't used anyhow and casting wxWndProc or m_oldWndProc
to WXFARPROC just resulted in gcc8 -Wcast-function-type warnings.

Get rid of them by not passing the window proc to this function at all.
This commit is contained in:
Vadim Zeitlin
2018-05-28 22:43:12 +02:00
parent 004af0b963
commit 7624e31a95
2 changed files with 6 additions and 3 deletions

View File

@@ -936,7 +936,10 @@ extern WXDLLIMPEXP_CORE int wxGetWindowId(WXHWND hWnd);
// check if hWnd's WNDPROC is wndProc. Return true if yes, false if they are
// different
extern WXDLLIMPEXP_CORE bool wxCheckWindowWndProc(WXHWND hWnd, WXFARPROC wndProc);
//
// wndProc parameter is unused and only kept for compatibility
extern WXDLLIMPEXP_CORE
bool wxCheckWindowWndProc(WXHWND hWnd, WXFARPROC wndProc = NULL);
// Does this window style specify any border?
inline bool wxStyleHasBorder(long style)

View File

@@ -1252,7 +1252,7 @@ void wxWindowMSW::SubclassWin(WXHWND hWnd)
// we don't need to subclass the window of our own class (in the Windows
// sense of the word)
if ( !wxCheckWindowWndProc(hWnd, (WXFARPROC)wxWndProc) )
if ( !wxCheckWindowWndProc(hWnd) )
{
wxSetWindowProc(hwnd, wxWndProc);
@@ -1289,7 +1289,7 @@ void wxWindowMSW::UnsubclassWin()
if ( m_oldWndProc )
{
if ( !wxCheckWindowWndProc((WXHWND)hwnd, m_oldWndProc) )
if ( !wxCheckWindowWndProc((WXHWND)hwnd) )
{
wxSetWindowProc(hwnd, (WNDPROC)m_oldWndProc);
}