X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/48850fa74dee8ace36f70059f1938488c4196a97..6a44bffd1ac68163e4c1cfe8aa8fe4f7f98a02e7:/src/gtk1/region.cpp?ds=sidebyside diff --git a/src/gtk1/region.cpp b/src/gtk1/region.cpp index 2159fea32e..2e40166981 100644 --- a/src/gtk1/region.cpp +++ b/src/gtk1/region.cpp @@ -133,22 +133,22 @@ wxObjectRefData *wxRegion::CloneRefData(const wxObjectRefData *data) const { return new wxRegionRefData(*(wxRegionRefData *)data); } + // ---------------------------------------------------------------------------- // wxRegion comparison // ---------------------------------------------------------------------------- bool wxRegion::operator==( const wxRegion& region ) { + if (m_refData == region.m_refData) return TRUE; + + if (!m_refData || !region.m_refData) return FALSE; + // compare the regions themselves, not the pointers to ref data! return gdk_region_equal(M_REGIONDATA->m_region, M_REGIONDATA_OF(region)->m_region); } -bool wxRegion::operator != ( const wxRegion& region ) -{ - return !(*this == region); -} - // ---------------------------------------------------------------------------- // wxRegion operations // ----------------------------------------------------------------------------