Use range loop (if possible)

This commit is contained in:
Filip Gawin
2019-02-01 19:47:07 +01:00
committed by Jordan Woyak
parent 0fa4812c2f
commit 0ede5d1537
15 changed files with 92 additions and 100 deletions

View File

@ -331,6 +331,7 @@ void RenderWidget::SetImGuiKeyMap()
{ImGuiKey_Z, Qt::Key_Z},
}};
auto lock = g_renderer->GetImGuiLock();
for (auto entry : key_map)
ImGui::GetIO().KeyMap[entry[0]] = entry[1] & 0x1FF;
for (auto [imgui_key, qt_key] : key_map)
ImGui::GetIO().KeyMap[imgui_key] = (qt_key & 0x1FF);
}