From 46a1983ae4a56bfa64b7dcc171f7d996cd980d8c Mon Sep 17 00:00:00 2001 From: Paul Cornett Date: Fri, 25 Nov 2011 00:52:24 +0000 Subject: [PATCH] use int instead of size_t for a couple member variables it's simpler, and there is no point in using size_t anyway since they are assigned from ints git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69815 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/gtk/region.h | 6 ++---- src/gtk/region.cpp | 12 +++++------- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/include/wx/gtk/region.h b/include/wx/gtk/region.h index 9fbbba8ea2..a00a0af674 100644 --- a/include/wx/gtk/region.h +++ b/include/wx/gtk/region.h @@ -122,13 +122,11 @@ private: void Init(); void CreateRects( const wxRegion& r ); - size_t m_current; wxRegion m_region; - wxRect *m_rects; - size_t m_numRects; + int m_numRects; + int m_current; -private: DECLARE_DYNAMIC_CLASS(wxRegionIterator) }; diff --git a/src/gtk/region.cpp b/src/gtk/region.cpp index cf1d5d363b..1f22346b7b 100644 --- a/src/gtk/region.cpp +++ b/src/gtk/region.cpp @@ -370,15 +370,13 @@ void wxRegionIterator::CreateRects( const wxRegion& region ) if (!gdkregion) return; - GdkRectangle *gdkrects = NULL; - gint numRects = 0; - gdk_region_get_rectangles( gdkregion, &gdkrects, &numRects ); + GdkRectangle* gdkrects; + gdk_region_get_rectangles(gdkregion, &gdkrects, &m_numRects); - m_numRects = numRects; - if (numRects) + if (m_numRects) { m_rects = new wxRect[m_numRects]; - for (size_t i=0; i < m_numRects; ++i) + for (int i = 0; i < m_numRects; ++i) { GdkRectangle &gr = gdkrects[i]; wxRect &wr = m_rects[i]; @@ -467,7 +465,7 @@ wxRegionIterator& wxRegionIterator::operator=(const wxRegionIterator& ri) if ( m_numRects ) { m_rects = new wxRect[m_numRects]; - for ( unsigned int n = 0; n < m_numRects; n++ ) + for ( int n = 0; n < m_numRects; n++ ) m_rects[n] = ri.m_rects[n]; } else -- 2.45.2