]> git.saurik.com Git - wxWidgets.git/blobdiff - src/x11/pen.cpp
remove needless casting (no real change)
[wxWidgets.git] / src / x11 / pen.cpp
index 31e4087bc2d68df0b74ac957a3f2f3ea122b7908..1c274eb754ec74049dfd8073a57069e3fd65430e 100644 (file)
@@ -86,13 +86,15 @@ wxPen::wxPen( const wxColour &colour, int width, wxPenStyle style )
     M_PENDATA->m_colour = colour;
 }
 
-wxPen::wxPen(const wxColour& colour, int width, wxBrushStyle style)
+#if FUTURE_WXWIN_COMPATIBILITY_3_0
+wxPen::wxPen(const wxColour& colour, int width, int style)
 {
     m_refData = new wxPenRefData();
     M_PENDATA->m_width = width;
     M_PENDATA->m_style = (wxPenStyle)style;
     M_PENDATA->m_colour = colour;
 }
+#endif
 
 wxPen::~wxPen()
 {
@@ -177,8 +179,10 @@ void wxPen::SetWidth( int width )
 
 int wxPen::GetDashes( wxDash **ptr ) const
 {
-     *ptr = (M_PENDATA ? (wxDash*)M_PENDATA->m_dash : (wxDash*) NULL);
-     return (M_PENDATA ? M_PENDATA->m_countDashes : 0);
+    wxCHECK_MSG( Ok(), -1, wxT("invalid pen") );
+
+    *ptr = (wxDash*)M_PENDATA->m_dash;
+    return M_PENDATA->m_countDashes;
 }
 
 int wxPen::GetDashCount() const