fixed wxRegion::operator==
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40997 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -33,6 +33,8 @@ public:
|
|||||||
|
|
||||||
~wxRegionRefData() {}
|
~wxRegionRefData() {}
|
||||||
|
|
||||||
|
// default assignment and comparision operators are OK
|
||||||
|
|
||||||
wxRect m_rect;
|
wxRect m_rect;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -80,11 +82,14 @@ wxRegion::~wxRegion()
|
|||||||
|
|
||||||
bool wxRegion::operator==(const wxRegion& region) const
|
bool wxRegion::operator==(const wxRegion& region) const
|
||||||
{
|
{
|
||||||
if ( m_refData != region.m_refData )
|
if ( m_refData == region.m_refData )
|
||||||
return false;
|
return true;
|
||||||
|
|
||||||
if ( !Ok() )
|
if ( !Ok() )
|
||||||
return true; // both invalid
|
{
|
||||||
|
// only equal if both are invalid, otherwise different
|
||||||
|
return !region.Ok();
|
||||||
|
}
|
||||||
|
|
||||||
return M_REGION->m_rect == M_REGION_OF(region)->m_rect;
|
return M_REGION->m_rect == M_REGION_OF(region)->m_rect;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user