Ref counting fixes and compile fixes.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13989 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2002-02-04 10:42:16 +00:00
parent 45e0dc9477
commit e0f0b19775
5 changed files with 33 additions and 1 deletions

View File

@@ -168,8 +168,18 @@ wxRegion::wxRegion( size_t n, const wxPoint *points, int fillStyle )
wxRegion::~wxRegion()
{
// m_refData unrefed in ~wxObject
}
wxObjectRefData *wxRegion::CreateRefData() const
{
return new wxRegionRefData;
}
wxObjectRefData *wxRegion::CloneRefData(const wxObjectRefData *data) const
{
return new wxRegionRefData(*(wxRegionRefData *)data);
}
// ----------------------------------------------------------------------------
// wxRegion comparison
// ----------------------------------------------------------------------------
@@ -202,6 +212,7 @@ bool wxRegion::Union( wxCoord x, wxCoord y, wxCoord width, wxCoord height )
rect.y = y;
rect.width = width;
rect.height = height;
if (!m_refData)
{
m_refData = new wxRegionRefData();
@@ -277,6 +288,7 @@ bool wxRegion::Intersect( wxCoord x, wxCoord y, wxCoord width, wxCoord height )
bool wxRegion::Intersect( const wxRect& rect )
{
wxRegion reg( rect );
return Intersect( reg );
}