From a357fefaf48fe771dd405ef251e29d2dccfeb7a0 Mon Sep 17 00:00:00 2001 From: Paul Cornett Date: Tue, 12 Sep 2017 09:47:55 -0700 Subject: [PATCH] Use const_cast in new code --- include/wx/peninfobase.h | 2 +- src/gtk/pen.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/wx/peninfobase.h b/include/wx/peninfobase.h index 33a0c40674..9fb499dbe4 100644 --- a/include/wx/peninfobase.h +++ b/include/wx/peninfobase.h @@ -79,7 +79,7 @@ public: T& Stipple(const wxBitmap& stipple) { m_stipple = stipple; m_style = wxPENSTYLE_STIPPLE; return This(); } T& Dashes(int nb_dashes, const wxDash *dash) - { m_nb_dashes = nb_dashes; m_dash = (wxDash *)dash; return This(); } + { m_nb_dashes = nb_dashes; m_dash = const_cast(dash); return This(); } T& Join(wxPenJoin join) { m_join = join; return This(); } T& Cap(wxPenCap cap) diff --git a/src/gtk/pen.cpp b/src/gtk/pen.cpp index e5976eb85a..3db6ead31e 100644 --- a/src/gtk/pen.cpp +++ b/src/gtk/pen.cpp @@ -53,7 +53,7 @@ public: m_joinStyle = info.GetJoin(); m_capStyle = info.GetCap(); m_colour = info.GetColour(); - m_countDashes = info.GetDashes((wxDash**)&m_dash); + m_countDashes = info.GetDashes(const_cast(&m_dash)); } bool operator == (const wxPenRefData& data) const