]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/region.cpp
Typos and other fixes
[wxWidgets.git] / src / gtk1 / region.cpp
index 2159fea32e336bae5f94261d6e5da4aa8d4fd62c..2e40166981948828a1966940883f0a4b9969bf5a 100644 (file)
@@ -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
 // ----------------------------------------------------------------------------