X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/94a007ece4bcd6231d31bcb91516463b7f981a0e..e19dbcf76b35cabe9487926b3a96d69c7f949d64:/src/msw/region.cpp diff --git a/src/msw/region.cpp b/src/msw/region.cpp index 3be6d5496c..fed4cda96b 100644 --- a/src/msw/region.cpp +++ b/src/msw/region.cpp @@ -72,7 +72,7 @@ public: private: // Cannot use -// DECLARE_NO_COPY_CLASS(wxRegionRefData) +// wxDECLARE_NO_COPY_CLASS(wxRegionRefData); // because copy constructor is explicitly declared above; // but no copy assignment operator is defined, so declare // it private to prevent the compiler from defining it: @@ -92,7 +92,7 @@ private: wxRegion::wxRegion() { - m_refData = (wxRegionRefData *)NULL; + m_refData = NULL; } wxRegion::wxRegion(WXHRGN hRegion) @@ -165,7 +165,7 @@ void wxRegion::Clear() bool wxRegion::DoOffset(wxCoord x, wxCoord y) { - wxCHECK_MSG( M_REGION, false, _T("invalid wxRegion") ); + wxCHECK_MSG( M_REGION, false, wxT("invalid wxRegion") ); if ( !x && !y ) { @@ -177,7 +177,7 @@ bool wxRegion::DoOffset(wxCoord x, wxCoord y) if ( ::OffsetRgn(GetHrgn(), x, y) == ERROR ) { - wxLogLastError(_T("OffsetRgn")); + wxLogLastError(wxT("OffsetRgn")); return false; } @@ -202,7 +202,7 @@ bool wxRegion::DoCombine(const wxRegion& rgn, wxRegionOp op) break; default: - wxFAIL_MSG( _T("unknown region operation") ); + wxFAIL_MSG( wxT("unknown region operation") ); // fall through case wxRGN_AND: @@ -235,7 +235,7 @@ bool wxRegion::DoCombine(const wxRegion& rgn, wxRegionOp op) break; default: - wxFAIL_MSG( _T("unknown region operation") ); + wxFAIL_MSG( wxT("unknown region operation") ); // fall through case wxRGN_COPY: @@ -245,7 +245,7 @@ bool wxRegion::DoCombine(const wxRegion& rgn, wxRegionOp op) if ( ::CombineRgn(M_REGION, M_REGION, M_REGION_OF(rgn), mode) == ERROR ) { - wxLogLastError(_T("CombineRgn")); + wxLogLastError(wxT("CombineRgn")); return false; } @@ -384,12 +384,7 @@ void wxRegionIterator::Reset(const wxRegion& region) m_current = 0; m_region = region; - if (m_rects) - { - delete[] m_rects; - - m_rects = NULL; - } + wxDELETEA(m_rects); if (m_region.Empty()) m_numRects = 0; @@ -441,28 +436,28 @@ wxRegionIterator wxRegionIterator::operator ++ (int) wxCoord wxRegionIterator::GetX() const { - wxCHECK_MSG( m_current < m_numRects, 0, _T("invalid wxRegionIterator") ); + wxCHECK_MSG( m_current < m_numRects, 0, wxT("invalid wxRegionIterator") ); return m_rects[m_current].x; } wxCoord wxRegionIterator::GetY() const { - wxCHECK_MSG( m_current < m_numRects, 0, _T("invalid wxRegionIterator") ); + wxCHECK_MSG( m_current < m_numRects, 0, wxT("invalid wxRegionIterator") ); return m_rects[m_current].y; } wxCoord wxRegionIterator::GetW() const { - wxCHECK_MSG( m_current < m_numRects, 0, _T("invalid wxRegionIterator") ); + wxCHECK_MSG( m_current < m_numRects, 0, wxT("invalid wxRegionIterator") ); return m_rects[m_current].width; } wxCoord wxRegionIterator::GetH() const { - wxCHECK_MSG( m_current < m_numRects, 0, _T("invalid wxRegionIterator") ); + wxCHECK_MSG( m_current < m_numRects, 0, wxT("invalid wxRegionIterator") ); return m_rects[m_current].height; }