Collapse 2 loop dependent variables into a single variable
This commit is contained in:
@@ -113,12 +113,11 @@ bool wxRadioBox::Create(wxWindow *parent,
|
|||||||
static void AddChoices( QButtonGroup *qtButtonGroup, QBoxLayout *qtBoxLayout, int count, const wxString choices[] )
|
static void AddChoices( QButtonGroup *qtButtonGroup, QBoxLayout *qtBoxLayout, int count, const wxString choices[] )
|
||||||
{
|
{
|
||||||
bool isFirst = true;
|
bool isFirst = true;
|
||||||
int id = 0;
|
|
||||||
|
|
||||||
while ( count-- > 0 )
|
for (int i = 0; i < count; ++i )
|
||||||
{
|
{
|
||||||
QRadioButton *btn = new QRadioButton( wxQtConvertString( *choices++ ));
|
QRadioButton *btn = new QRadioButton( wxQtConvertString( choices[i] ));
|
||||||
qtButtonGroup->addButton( btn, id++ );
|
qtButtonGroup->addButton( btn, i );
|
||||||
qtBoxLayout->addWidget( btn );
|
qtBoxLayout->addWidget( btn );
|
||||||
|
|
||||||
if ( isFirst )
|
if ( isFirst )
|
||||||
|
Reference in New Issue
Block a user