Use const_cast in new code

This commit is contained in:
Paul Cornett
2017-09-12 09:47:55 -07:00
parent 97dcc02db5
commit a357fefaf4
2 changed files with 2 additions and 2 deletions

View File

@@ -79,7 +79,7 @@ public:
T& Stipple(const wxBitmap& stipple) T& Stipple(const wxBitmap& stipple)
{ m_stipple = stipple; m_style = wxPENSTYLE_STIPPLE; return This(); } { m_stipple = stipple; m_style = wxPENSTYLE_STIPPLE; return This(); }
T& Dashes(int nb_dashes, const wxDash *dash) 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<wxDash*>(dash); return This(); }
T& Join(wxPenJoin join) T& Join(wxPenJoin join)
{ m_join = join; return This(); } { m_join = join; return This(); }
T& Cap(wxPenCap cap) T& Cap(wxPenCap cap)

View File

@@ -53,7 +53,7 @@ public:
m_joinStyle = info.GetJoin(); m_joinStyle = info.GetJoin();
m_capStyle = info.GetCap(); m_capStyle = info.GetCap();
m_colour = info.GetColour(); m_colour = info.GetColour();
m_countDashes = info.GetDashes((wxDash**)&m_dash); m_countDashes = info.GetDashes(const_cast<wxDash**>(&m_dash));
} }
bool operator == (const wxPenRefData& data) const bool operator == (const wxPenRefData& data) const