Explorar o código

configure_hotkeys: Make comparison check a little more self-documenting

This is checking if an index is valid or not and returning early if it
isn't.
Lioncash %!s(int64=7) %!d(string=hai) anos
pai
achega
cf6cdd20f8
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      src/yuzu/configuration/configure_hotkeys.cpp

+ 2 - 1
src/yuzu/configuration/configure_hotkeys.cpp

@@ -66,8 +66,9 @@ void ConfigureHotkeys::Populate(const HotkeyRegistry& registry) {
 }
 
 void ConfigureHotkeys::Configure(QModelIndex index) {
-    if (index.parent() == QModelIndex())
+    if (!index.parent().isValid()) {
         return;
+    }
 
     index = index.sibling(index.row(), 1);
     auto* model = ui->hotkey_list->model();