From f8aacfa02c38cf64cdb21ceed6e7b2fda8bd761f Mon Sep 17 00:00:00 2001 From: Artur Wieczorek Date: Fri, 29 Aug 2014 21:53:27 +0000 Subject: [PATCH] Optimize allocating default cells in wxPGProperty::EnsureCells Use embedded 'resize' function to alloc new slots at once instead of doing this in an iterative way. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77506 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/propgrid/property.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/propgrid/property.cpp b/src/propgrid/property.cpp index e42c635e85..740cb00284 100644 --- a/src/propgrid/property.cpp +++ b/src/propgrid/property.cpp @@ -1607,11 +1607,8 @@ void wxPGProperty::EnsureCells( unsigned int column ) defaultCell = pg->GetCategoryDefaultCell(); } - // TODO: Replace with resize() call - unsigned int cellCountMax = column+1; - - for ( unsigned int i=m_cells.size(); i