From cd747e1598205eddde96768b61cc7f0b324ba870 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 24 Jan 2012 21:50:34 +0000 Subject: [PATCH] Append all items at once during wxChoice creation in wxMSW. Appending all items at once is more efficient than doing it one by one in the loop 9probably because of CB_INITSTORAGE that we send in this case). Closes #13899. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70454 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/choice.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/msw/choice.cpp b/src/msw/choice.cpp index 8dc803b88b..ee5f46167e 100644 --- a/src/msw/choice.cpp +++ b/src/msw/choice.cpp @@ -86,10 +86,7 @@ bool wxChoice::CreateAndInit(wxWindow *parent, // initialize the controls contents - for ( int i = 0; i < n; i++ ) - { - Append(choices[i]); - } + Append(n, choices); // and now we may finally size the control properly (if needed) SetInitialSize(size); -- 2.45.2