Shut up some Clang warnings in DoConfig
This commit is contained in:
parent
6b98bffba1
commit
b14e0939a9
1 changed files with 6 additions and 8 deletions
|
@ -44,7 +44,6 @@ public:
|
||||||
private:
|
private:
|
||||||
Fl_Group *group;
|
Fl_Group *group;
|
||||||
Fl_Radio_Round_Button *buttons[6];
|
Fl_Radio_Round_Button *buttons[6];
|
||||||
Fl_Group *label;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static char config_path[FILENAME_MAX];
|
static char config_path[FILENAME_MAX];
|
||||||
|
@ -72,17 +71,16 @@ RadioRow::RadioRow(char offset)
|
||||||
this->group = new Fl_Group(140 + offset * 30, 150, 30, 180);
|
this->group = new Fl_Group(140 + offset * 30, 150, 30, 180);
|
||||||
this->group->label(temp);
|
this->group->label(temp);
|
||||||
this->group->align(FL_ALIGN_TOP_LEFT);
|
this->group->align(FL_ALIGN_TOP_LEFT);
|
||||||
for (char i = 0; i < 6; i++)
|
for (int i = 0; i < 6; i++)
|
||||||
this->buttons[i] = new Fl_Radio_Round_Button(140 + offset * 30, 150 + 30 * i, 30, 30);
|
this->buttons[i] = new Fl_Radio_Round_Button(140 + offset * 30, 150 + 30 * i, 30, 30);
|
||||||
this->group->end();
|
this->group->end();
|
||||||
}
|
}
|
||||||
|
|
||||||
int RadioRow::value()
|
int RadioRow::value()
|
||||||
{
|
{
|
||||||
char i;
|
for (int i = 0; i < 6; i++)
|
||||||
for (i = 0; i < 6; i++)
|
|
||||||
if (this->buttons[i]->value())
|
if (this->buttons[i]->value())
|
||||||
return (int)i;
|
return i;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -135,7 +133,7 @@ void read_Config()
|
||||||
if (!CharsToLong(config.useJoy))
|
if (!CharsToLong(config.useJoy))
|
||||||
joystuffcontainer->deactivate();
|
joystuffcontainer->deactivate();
|
||||||
|
|
||||||
for (char i = 0; i < 8; i++)
|
for (int i = 0; i < 8; i++)
|
||||||
{
|
{
|
||||||
const unsigned long button = CharsToLong(config.buttons[i]);
|
const unsigned long button = CharsToLong(config.buttons[i]);
|
||||||
if (button < 6 && button > 0)
|
if (button < 6 && button > 0)
|
||||||
|
@ -154,7 +152,7 @@ void write_Config(Fl_Widget *, void *)
|
||||||
|
|
||||||
LongToChars(displaychoice->value(), config.display);
|
LongToChars(displaychoice->value(), config.display);
|
||||||
LongToChars(joychoice->value(), config.useJoy);
|
LongToChars(joychoice->value(), config.useJoy);
|
||||||
for (char i = 0; i < 8; i++)
|
for (int i = 0; i < 8; i++)
|
||||||
{
|
{
|
||||||
const unsigned int button_lookup[6] = {0, 1, 2, 5, 3, 4};
|
const unsigned int button_lookup[6] = {0, 1, 2, 5, 3, 4};
|
||||||
LongToChars(button_lookup[joyRows[i]->value()] + 1, config.buttons[i]);
|
LongToChars(button_lookup[joyRows[i]->value()] + 1, config.buttons[i]);
|
||||||
|
@ -223,7 +221,7 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
joystuffcontainer = new Fl_Group(10, 130, 380, 200);
|
joystuffcontainer = new Fl_Group(10, 130, 380, 200);
|
||||||
joystuffcontainer->box(FL_THIN_DOWN_BOX);
|
joystuffcontainer->box(FL_THIN_DOWN_BOX);
|
||||||
for (char i = 0; i < 8; i++)
|
for (int i = 0; i < 8; i++)
|
||||||
{
|
{
|
||||||
joyRows[i] = new RadioRow(i);
|
joyRows[i] = new RadioRow(i);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue