diff options
| author | 2018-09-09 19:35:05 -0400 | |
|---|---|---|
| committer | 2018-09-09 19:46:07 -0400 | |
| commit | 73a2d71f449020dbf4e0cc165de8b1b157bc927c (patch) | |
| tree | 6d424fc92478ab2a89933ed7f026b66759fd7752 | |
| parent | yuzu: Move compatibility list specifics to their own source files (diff) | |
| download | yuzu-73a2d71f449020dbf4e0cc165de8b1b157bc927c.tar.gz yuzu-73a2d71f449020dbf4e0cc165de8b1b157bc927c.tar.xz yuzu-73a2d71f449020dbf4e0cc165de8b1b157bc927c.zip | |
game_list: Make CompatibilityList parameter of NavigateToGamedbEntryRequested() a const reference
The compatibility list isn't modified within any of the slots connected
to this signal, so we can make it const to enforce immutability.
| -rw-r--r-- | src/yuzu/game_list.h | 3 | ||||
| -rw-r--r-- | src/yuzu/main.cpp | 2 | ||||
| -rw-r--r-- | src/yuzu/main.h | 3 |
3 files changed, 5 insertions, 3 deletions
diff --git a/src/yuzu/game_list.h b/src/yuzu/game_list.h index e01b44c20..2713e7b54 100644 --- a/src/yuzu/game_list.h +++ b/src/yuzu/game_list.h | |||
| @@ -89,7 +89,8 @@ signals: | |||
| 89 | void GameChosen(QString game_path); | 89 | void GameChosen(QString game_path); |
| 90 | void ShouldCancelWorker(); | 90 | void ShouldCancelWorker(); |
| 91 | void OpenFolderRequested(u64 program_id, GameListOpenTarget target); | 91 | void OpenFolderRequested(u64 program_id, GameListOpenTarget target); |
| 92 | void NavigateToGamedbEntryRequested(u64 program_id, CompatibilityList& compatibility_list); | 92 | void NavigateToGamedbEntryRequested(u64 program_id, |
| 93 | const CompatibilityList& compatibility_list); | ||
| 93 | 94 | ||
| 94 | private slots: | 95 | private slots: |
| 95 | void onTextChanged(const QString& newText); | 96 | void onTextChanged(const QString& newText); |
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 366169eef..e36914f14 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp | |||
| @@ -727,7 +727,7 @@ void GMainWindow::OnGameListOpenFolder(u64 program_id, GameListOpenTarget target | |||
| 727 | } | 727 | } |
| 728 | 728 | ||
| 729 | void GMainWindow::OnGameListNavigateToGamedbEntry(u64 program_id, | 729 | void GMainWindow::OnGameListNavigateToGamedbEntry(u64 program_id, |
| 730 | CompatibilityList& compatibility_list) { | 730 | const CompatibilityList& compatibility_list) { |
| 731 | const auto it = FindMatchingCompatibilityEntry(compatibility_list, program_id); | 731 | const auto it = FindMatchingCompatibilityEntry(compatibility_list, program_id); |
| 732 | 732 | ||
| 733 | QString directory; | 733 | QString directory; |
diff --git a/src/yuzu/main.h b/src/yuzu/main.h index 64516a332..552e3e61c 100644 --- a/src/yuzu/main.h +++ b/src/yuzu/main.h | |||
| @@ -138,7 +138,8 @@ private slots: | |||
| 138 | /// Called whenever a user selects a game in the game list widget. | 138 | /// Called whenever a user selects a game in the game list widget. |
| 139 | void OnGameListLoadFile(QString game_path); | 139 | void OnGameListLoadFile(QString game_path); |
| 140 | void OnGameListOpenFolder(u64 program_id, GameListOpenTarget target); | 140 | void OnGameListOpenFolder(u64 program_id, GameListOpenTarget target); |
| 141 | void OnGameListNavigateToGamedbEntry(u64 program_id, CompatibilityList& compatibility_list); | 141 | void OnGameListNavigateToGamedbEntry(u64 program_id, |
| 142 | const CompatibilityList& compatibility_list); | ||
| 142 | void OnMenuLoadFile(); | 143 | void OnMenuLoadFile(); |
| 143 | void OnMenuLoadFolder(); | 144 | void OnMenuLoadFolder(); |
| 144 | void OnMenuInstallToNAND(); | 145 | void OnMenuInstallToNAND(); |