mirror of https://github.com/PCSX2/pcsx2.git
onepad: use range loop for hash iteration
This commit is contained in:
parent
c183de5662
commit
a50766384b
|
@ -441,11 +441,9 @@ void Dialog::repopulate()
|
|||
{
|
||||
for (int gamepad_id = 0; gamepad_id < GAMEPAD_NUMBER; ++gamepad_id) {
|
||||
// keyboard/mouse key
|
||||
map<u32, u32>::iterator it;
|
||||
for (it = conf->keysym_map[gamepad_id].begin();
|
||||
it != conf->keysym_map[gamepad_id].end(); ++it) {
|
||||
int keysym = it->first;
|
||||
int key = it->second;
|
||||
for (const auto &it : conf->keysym_map[gamepad_id]) {
|
||||
int keysym = it.first;
|
||||
int key = it.second;
|
||||
|
||||
m_bt_gamepad[gamepad_id][key]->SetLabel(
|
||||
KeyName(gamepad_id, key, keysym).c_str());
|
||||
|
|
|
@ -95,10 +95,9 @@ void SaveConfig()
|
|||
fprintf(f, "joy_pad_map = %d\n", conf->joyid_map);
|
||||
fprintf(f, "ff_intensity = %d\n", conf->get_ff_intensity());
|
||||
|
||||
map<u32, u32>::iterator it;
|
||||
for (int pad = 0; pad < GAMEPAD_NUMBER; pad++)
|
||||
for (it = conf->keysym_map[pad].begin(); it != conf->keysym_map[pad].end(); ++it)
|
||||
fprintf(f, "PAD %d:KEYSYM 0x%x = %d\n", pad, it->first, it->second);
|
||||
for (auto const &it : conf->keysym_map[pad])
|
||||
fprintf(f, "PAD %d:KEYSYM 0x%x = %d\n", pad, it.first, it.second);
|
||||
|
||||
fclose(f);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue