Remove unnecessary checks for null pointer before deleting it
No real changes.
This commit is contained in:
committed by
Vadim Zeitlin
parent
5929c5831e
commit
0cd2f7b687
@@ -279,14 +279,12 @@ wxRegionIterator::wxRegionIterator(const wxRegionIterator& ri)
|
||||
|
||||
wxRegionIterator::~wxRegionIterator()
|
||||
{
|
||||
if ( m_qtRects != NULL )
|
||||
delete m_qtRects;
|
||||
delete m_qtRects;
|
||||
}
|
||||
|
||||
wxRegionIterator& wxRegionIterator::operator=(const wxRegionIterator& ri)
|
||||
{
|
||||
if ( m_qtRects != NULL )
|
||||
delete m_qtRects;
|
||||
delete m_qtRects;
|
||||
|
||||
m_qtRects = new QVector< QRect >( *ri.m_qtRects );
|
||||
m_pos = ri.m_pos;
|
||||
@@ -300,8 +298,7 @@ void wxRegionIterator::Reset()
|
||||
|
||||
void wxRegionIterator::Reset(const wxRegion& region)
|
||||
{
|
||||
if ( m_qtRects != NULL )
|
||||
delete m_qtRects;
|
||||
delete m_qtRects;
|
||||
|
||||
m_qtRects = new QVector< QRect >( region.GetHandle().rects() );
|
||||
m_pos = 0;
|
||||
|
Reference in New Issue
Block a user