From 7aa920b5a52e59e7e9cb4c0b9af6697fb79a4a1a Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 31 Oct 2006 12:02:36 +0000 Subject: [PATCH] blind compilation fixes for OS/2 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42834 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/os2/brush.h | 7 +++++++ include/wx/os2/pen.h | 6 +++--- src/os2/brush.cpp | 13 +++++++++++++ 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/include/wx/os2/brush.h b/include/wx/os2/brush.h index 04b160e4f7..0e03ceb992 100644 --- a/include/wx/os2/brush.h +++ b/include/wx/os2/brush.h @@ -26,6 +26,13 @@ public: wxBrushRefData(const wxBrushRefData& rData); virtual ~wxBrushRefData(); + bool operator == (const wxBrushRefData& data) const + { + return (m_nStyle == data.m_nStyle && + m_vStipple.IsSameAs(data.m_vStipple) && + m_vColour == data.m_vColour); + } + protected: int m_nStyle; wxBitmap m_vStipple ; diff --git a/include/wx/os2/pen.h b/include/wx/os2/pen.h index 1656eec288..151aef8118 100644 --- a/include/wx/os2/pen.h +++ b/include/wx/os2/pen.h @@ -35,8 +35,8 @@ public: m_nJoin == data.m_nJoin && m_nCap == data.m_nCap && m_vColour == data.m_vColour && - (m_style != wxSTIPPLE || m_stipple.IsSameAs(data.m_stipple)) && - (m_style != wxUSER_DASH || + (m_nStyle != wxSTIPPLE || m_vStipple.IsSameAs(data.m_vStipple)) && + (m_nStyle != wxUSER_DASH || (m_dash == data.m_dash && memcmp(m_dash, data.m_dash, m_nbDash*sizeof(wxDash)) == 0)); } @@ -72,7 +72,7 @@ public: inline bool operator == (const wxPen& rPen) const { - const wxPenRefData *penData = (wxPenRefData *)pen.m_refData; + const wxPenRefData *penData = (wxPenRefData *)rPen.m_refData; // an invalid pen is only equal to another invalid pen return m_refData ? penData && *M_PENDATA == *penData : !penData; diff --git a/src/os2/brush.cpp b/src/os2/brush.cpp index 1c9f7c84d5..91b77c959e 100644 --- a/src/os2/brush.cpp +++ b/src/os2/brush.cpp @@ -291,3 +291,16 @@ void wxBrush::SetPS( M_BRUSHDATA->m_hBrush = hPS; RealizeResource(); } // end of WxWinGdi_CPen::SetPS + + +bool wxBrush::operator == ( + const wxBrush& brush +) const +{ + if (m_refData == brush.m_refData) return true; + + if (!m_refData || !brush.m_refData) return false; + + return ( *(wxBrushRefData*)m_refData == *(wxBrushRefData*)brush.m_refData ); +} // end of wxBrush::operator == + -- 2.45.2