// accessors and setters
// ---------------------
- wxColour& GetColour() const { return wx_const_cast(wxColour&, m_colour); }
+ wxColour& GetColour() const { return const_cast<wxColour&>(m_colour); }
int GetWidth() const { return m_width; }
wxPenStyle GetStyle() const { return m_style; }
wxPenJoin GetJoin() const { return m_join; }
wxPenCap GetCap() const { return m_cap; }
wxDash* GetDash() const { return m_dash; }
int GetDashCount() const { return m_nbDash; }
- wxBitmap* GetStipple() const { return wx_const_cast(wxBitmap *, &m_stipple); }
+ wxBitmap* GetStipple() const { return const_cast<wxBitmap *>(&m_stipple); }
void SetColour(const wxColour& col) { Free(); m_colour = col; }
void SetWidth(int width) { Free(); m_width = width; }
Free();
m_nbDash = nb_dashes;
- m_dash = wx_const_cast(wxDash *, dash);
+ m_dash = const_cast<wxDash *>(dash);
}
void SetJoin(wxPenJoin join) { Free(); m_join = join; }
wxColour m_colour;
HPEN m_hPen;
- DECLARE_NO_ASSIGN_CLASS(wxPenRefData)
+ wxDECLARE_NO_ASSIGN_CLASS(wxPenRefData);
};
// ============================================================================
return PS_NULL;
default:
- wxFAIL_MSG( _T("unknown pen style") );
+ wxFAIL_MSG( wxT("unknown pen style") );
// fall through
#ifdef wxHAVE_EXT_CREATE_PEN
return PS_JOIN_MITER;
default:
- wxFAIL_MSG( _T("unknown pen join style") );
+ wxFAIL_MSG( wxT("unknown pen join style") );
// fall through
case wxJOIN_ROUND:
return PS_ENDCAP_FLAT;
default:
- wxFAIL_MSG( _T("unknown pen cap style") );
+ wxFAIL_MSG( wxT("unknown pen cap style") );
// fall through
case wxCAP_ROUND:
default:
lb.lbStyle = BS_SOLID;
-#ifdef __WXDEBUG__
// this should be unnecessary (it's unused) but suppresses the
// Purify messages about uninitialized memory read
lb.lbHatch = 0;
-#endif
break;
}
WXHPEN wxPenRefData::GetHPEN() const
{
if ( !m_hPen )
- wx_const_cast(wxPenRefData *, this)->Alloc();
+ const_cast<wxPenRefData *>(this)->Alloc();
return (WXHPEN)m_hPen;
}
bool wxPen::operator==(const wxPen& pen) const
{
const wxPenRefData *
- penData = wx_static_cast(const wxPenRefData *, pen.m_refData);
+ penData = static_cast<const wxPenRefData *>(pen.m_refData);
// an invalid pen is only equal to another invalid pen
return m_refData ? penData && *M_PENDATA == *penData : !penData;
wxGDIRefData* wxPen::CloneGDIRefData(const wxGDIRefData* data) const
{
- return new wxPenRefData(*wx_static_cast(const wxPenRefData*, data));
+ return new wxPenRefData(*static_cast<const wxPenRefData*>(data));
}
void wxPen::SetColour(const wxColour& col)