Collapse 2 loop dependent variables into a single variable

This commit is contained in:
Graham Dawes
2019-01-11 11:55:42 +00:00
parent d411c3159c
commit 12d4ed3e8c

View File

@@ -113,12 +113,11 @@ bool wxRadioBox::Create(wxWindow *parent,
static void AddChoices( QButtonGroup *qtButtonGroup, QBoxLayout *qtBoxLayout, int count, const wxString choices[] )
{
bool isFirst = true;
int id = 0;
while ( count-- > 0 )
for (int i = 0; i < count; ++i )
{
QRadioButton *btn = new QRadioButton( wxQtConvertString( *choices++ ));
qtButtonGroup->addButton( btn, id++ );
QRadioButton *btn = new QRadioButton( wxQtConvertString( choices[i] ));
qtButtonGroup->addButton( btn, i );
qtBoxLayout->addWidget( btn );
if ( isFirst )