From dca6f310bb56fc54b8e2ef888694b38dfd9cd21a Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 30 Aug 2020 21:05:43 +0200 Subject: [PATCH] Replace C-style cast with const_cast<> in wxUniv Don't use C casts to remove const-ness (avoids gcc -Wcast-qual). --- include/wx/univ/control.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/wx/univ/control.h b/include/wx/univ/control.h index 8a623da0ed..f6b4f66645 100644 --- a/include/wx/univ/control.h +++ b/include/wx/univ/control.h @@ -79,7 +79,10 @@ public: return m_indexAccel == -1 ? wxT('\0') : (wxChar)m_label[m_indexAccel]; } - virtual wxWindow *GetInputWindow() const wxOVERRIDE { return (wxWindow*)this; } + virtual wxWindow *GetInputWindow() const wxOVERRIDE + { + return const_cast(this); + } protected: // common part of all ctors