summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2019-04-09 19:47:18 -0400
committerLioncash <mathew1800@gmail.com>2019-04-09 19:47:20 -0400
commitcf6cdd20f8a62179891476481c45abff751e0ead (patch)
treead6b2885514657e9048525240a14601fac3c84d4 /src
parentc4ba717491ba4c002a3122551abc87920edea2e7 (diff)
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.
Diffstat (limited to 'src')
-rw-r--r--src/yuzu/configuration/configure_hotkeys.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/yuzu/configuration/configure_hotkeys.cpp b/src/yuzu/configuration/configure_hotkeys.cpp
index 55d23d329..e1ddf61eb 100644
--- a/src/yuzu/configuration/configure_hotkeys.cpp
+++ b/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();