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