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:
@@ -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)
|
||||
|
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user