X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1aca6611e695531e77e79e19e19da12d4c57dff0..8b2e0e6d199351c14ff0fe621ea8c8a3e4055a26:/src/os2/pen.cpp diff --git a/src/os2/pen.cpp b/src/os2/pen.cpp index effcfc0cbe..301c86059c 100644 --- a/src/os2/pen.cpp +++ b/src/os2/pen.cpp @@ -168,6 +168,15 @@ wxPen::wxPen( RealizeResource(); } // end of wxPen::wxPen +bool wxPen::operator==(const wxPen& pen) const +{ + const wxPenRefData * + penData = wx_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; +} + int wx2os2PenStyle( wxPenStyle nWxStyle ); @@ -479,7 +488,7 @@ void wxPen::SetCap( RealizeResource(); } // end of wxPen::SetCap -wxColour& wxPen::GetColour() const +wxColour wxPen::GetColour() const { wxCHECK_MSG( Ok(), wxNullColour, wxT("invalid pen") );