diff options
| author | 2019-04-09 19:47:18 -0400 | |
|---|---|---|
| committer | 2019-04-09 19:47:20 -0400 | |
| commit | cf6cdd20f8a62179891476481c45abff751e0ead (patch) | |
| tree | ad6b2885514657e9048525240a14601fac3c84d4 /src | |
| parent | configure_dialog: Amend constructor initializer list order (diff) | |
| download | yuzu-cf6cdd20f8a62179891476481c45abff751e0ead.tar.gz yuzu-cf6cdd20f8a62179891476481c45abff751e0ead.tar.xz yuzu-cf6cdd20f8a62179891476481c45abff751e0ead.zip | |
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.cpp | 3 |
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) { | |||
| 66 | } | 66 | } |
| 67 | 67 | ||
| 68 | void ConfigureHotkeys::Configure(QModelIndex index) { | 68 | void ConfigureHotkeys::Configure(QModelIndex index) { |
| 69 | if (index.parent() == QModelIndex()) | 69 | if (!index.parent().isValid()) { |
| 70 | return; | 70 | return; |
| 71 | } | ||
| 71 | 72 | ||
| 72 | index = index.sibling(index.row(), 1); | 73 | index = index.sibling(index.row(), 1); |
| 73 | auto* model = ui->hotkey_list->model(); | 74 | auto* model = ui->hotkey_list->model(); |