From ababdf5ffd2832eb96f1a6b94cbb325ed74dbcad Mon Sep 17 00:00:00 2001 From: Paul Cornett Date: Fri, 25 Nov 2011 00:59:45 +0000 Subject: [PATCH] copy array with memcpy rather than a loop git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69816 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/region.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/gtk/region.cpp b/src/gtk/region.cpp index 1f22346b7b..dcf7ee5b2b 100644 --- a/src/gtk/region.cpp +++ b/src/gtk/region.cpp @@ -465,12 +465,7 @@ wxRegionIterator& wxRegionIterator::operator=(const wxRegionIterator& ri) if ( m_numRects ) { m_rects = new wxRect[m_numRects]; - for ( int n = 0; n < m_numRects; n++ ) - m_rects[n] = ri.m_rects[n]; - } - else - { - m_rects = NULL; + memcpy(m_rects, ri.m_rects, m_numRects * sizeof m_rects[0]); } return *this; -- 2.45.2