From 8793e7fc1189fa060776d9103a7c6ceb1ef9a21c Mon Sep 17 00:00:00 2001 From: Artur Wieczorek Date: Mon, 12 Nov 2018 23:47:26 +0100 Subject: [PATCH] Reduce the scope of variables using to index the loops --- src/generic/odcombo.cpp | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/src/generic/odcombo.cpp b/src/generic/odcombo.cpp index fffb15a601..dace6230a4 100644 --- a/src/generic/odcombo.cpp +++ b/src/generic/odcombo.cpp @@ -544,9 +544,7 @@ int wxVListBoxComboPopup::Append(const wxString& item) // Find position // TODO: Could be optimized with binary search const wxArrayString& strings = m_strings; - unsigned int i; - - for ( i=0; iGetFont(); dc.SetFont(m_useFont); - for ( i=0; i bestWidth ) @@ -849,11 +844,9 @@ wxSize wxVListBoxComboPopup::GetAdjustedSize( int minWidth, int prefHeight, int //void wxVListBoxComboPopup::Populate( int n, const wxString choices[] ) void wxVListBoxComboPopup::Populate( const wxArrayString& choices ) { - int i; - int n = choices.GetCount(); - for ( i=0; i