X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/48850fa74dee8ace36f70059f1938488c4196a97..7dbf53606503c1c196419ba8b7b7a49d0e696dca:/src/gtk1/region.cpp 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 // ----------------------------------------------------------------------------