From 28605bfcfbb8eaeadeb6588c4101796d4e79a2e0 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 19 Mar 2022 22:17:55 +0100 Subject: [PATCH] Make wxDumpWindow() take const wxWindow pointer There is no reason not to allow calling this function with const window, so do allow it, notably to make it possible to use it with "this" from const wxWindow methods. --- include/wx/window.h | 2 +- interface/wx/window.h | 2 +- src/common/wincmn.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/wx/window.h b/include/wx/window.h index 2fafa644c4..632cea3313 100644 --- a/include/wx/window.h +++ b/include/wx/window.h @@ -2148,7 +2148,7 @@ extern WXDLLIMPEXP_CORE wxWindow *wxGetActiveWindow(); WXDLLIMPEXP_CORE wxWindow* wxGetTopLevelParent(wxWindowBase *win); // Return a string with platform-dependent description of the window. -extern WXDLLIMPEXP_CORE wxString wxDumpWindow(wxWindowBase* win); +extern WXDLLIMPEXP_CORE wxString wxDumpWindow(const wxWindowBase* win); #if wxUSE_ACCESSIBILITY // ---------------------------------------------------------------------------- diff --git a/interface/wx/window.h b/interface/wx/window.h index 09f275316e..1688fd5ed8 100644 --- a/interface/wx/window.h +++ b/interface/wx/window.h @@ -4364,7 +4364,7 @@ wxWindow* wxGetTopLevelParent(wxWindow* window); @since 3.1.6 */ -wxString wxDumpWindow(wxWindow* window); +wxString wxDumpWindow(const wxWindow* window); //@} diff --git a/src/common/wincmn.cpp b/src/common/wincmn.cpp index 92cf9bbdac..8474741074 100644 --- a/src/common/wincmn.cpp +++ b/src/common/wincmn.cpp @@ -3722,7 +3722,7 @@ wxWindow* wxGetTopLevelParent(wxWindowBase *win_) return win; } -wxString wxDumpWindow(wxWindowBase* win) +wxString wxDumpWindow(const wxWindowBase* win) { if ( !win ) return wxString::FromAscii("[no window]");