diff options
| author | 2022-09-28 14:37:23 -0700 | |
|---|---|---|
| committer | 2022-09-28 14:37:23 -0700 | |
| commit | 9015a512c275e8d7979715632bf5ae67fe3adf2f (patch) | |
| tree | 1bf9bb4098fd6533280b314745d9fb329f6ec1ca | |
| parent | Merge pull request #8989 from merryhime/loader-nullptr (diff) | |
| parent | yuzu: Silence some clang warnings (diff) | |
| download | yuzu-9015a512c275e8d7979715632bf5ae67fe3adf2f.tar.gz yuzu-9015a512c275e8d7979715632bf5ae67fe3adf2f.tar.xz yuzu-9015a512c275e8d7979715632bf5ae67fe3adf2f.zip | |
Merge pull request #8940 from german77/silence
yuzu: Silence some clang warnings
Diffstat (limited to '')
| -rw-r--r-- | src/core/hle/service/hid/irs.cpp | 3 | ||||
| -rw-r--r-- | src/yuzu/applets/qt_controller.cpp | 2 | ||||
| -rw-r--r-- | src/yuzu/configuration/configure_input.cpp | 7 | ||||
| -rw-r--r-- | src/yuzu/main.cpp | 4 |
4 files changed, 8 insertions, 8 deletions
diff --git a/src/core/hle/service/hid/irs.cpp b/src/core/hle/service/hid/irs.cpp index c4b44cbf9..6a3453457 100644 --- a/src/core/hle/service/hid/irs.cpp +++ b/src/core/hle/service/hid/irs.cpp | |||
| @@ -542,7 +542,8 @@ Result IRS::IsIrCameraHandleValid(const Core::IrSensor::IrCameraHandle& camera_h | |||
| 542 | 542 | ||
| 543 | Core::IrSensor::DeviceFormat& IRS::GetIrCameraSharedMemoryDeviceEntry( | 543 | Core::IrSensor::DeviceFormat& IRS::GetIrCameraSharedMemoryDeviceEntry( |
| 544 | const Core::IrSensor::IrCameraHandle& camera_handle) { | 544 | const Core::IrSensor::IrCameraHandle& camera_handle) { |
| 545 | ASSERT_MSG(sizeof(StatusManager::device) > camera_handle.npad_id, "invalid npad_id"); | 545 | const auto npad_id_max_index = static_cast<u8>(sizeof(StatusManager::device)); |
| 546 | ASSERT_MSG(camera_handle.npad_id < npad_id_max_index, "invalid npad_id"); | ||
| 546 | return shared_memory->device[camera_handle.npad_id]; | 547 | return shared_memory->device[camera_handle.npad_id]; |
| 547 | } | 548 | } |
| 548 | 549 | ||
diff --git a/src/yuzu/applets/qt_controller.cpp b/src/yuzu/applets/qt_controller.cpp index 1d8072243..12efdc216 100644 --- a/src/yuzu/applets/qt_controller.cpp +++ b/src/yuzu/applets/qt_controller.cpp | |||
| @@ -291,7 +291,7 @@ bool QtControllerSelectorDialog::CheckIfParametersMet() { | |||
| 291 | // Here, we check and validate the current configuration against all applicable parameters. | 291 | // Here, we check and validate the current configuration against all applicable parameters. |
| 292 | const auto num_connected_players = static_cast<int>( | 292 | const auto num_connected_players = static_cast<int>( |
| 293 | std::count_if(player_groupboxes.begin(), player_groupboxes.end(), | 293 | std::count_if(player_groupboxes.begin(), player_groupboxes.end(), |
| 294 | [this](const QGroupBox* player) { return player->isChecked(); })); | 294 | [](const QGroupBox* player) { return player->isChecked(); })); |
| 295 | 295 | ||
| 296 | const auto min_supported_players = parameters.enable_single_mode ? 1 : parameters.min_players; | 296 | const auto min_supported_players = parameters.enable_single_mode ? 1 : parameters.min_players; |
| 297 | const auto max_supported_players = parameters.enable_single_mode ? 1 : parameters.max_players; | 297 | const auto max_supported_players = parameters.enable_single_mode ? 1 : parameters.max_players; |
diff --git a/src/yuzu/configuration/configure_input.cpp b/src/yuzu/configuration/configure_input.cpp index cb55472c9..1db374d4a 100644 --- a/src/yuzu/configuration/configure_input.cpp +++ b/src/yuzu/configuration/configure_input.cpp | |||
| @@ -163,10 +163,9 @@ void ConfigureInput::Initialize(InputCommon::InputSubsystem* input_subsystem, | |||
| 163 | [this, input_subsystem, &hid_core] { | 163 | [this, input_subsystem, &hid_core] { |
| 164 | CallConfigureDialog<ConfigureRingController>(*this, input_subsystem, hid_core); | 164 | CallConfigureDialog<ConfigureRingController>(*this, input_subsystem, hid_core); |
| 165 | }); | 165 | }); |
| 166 | connect(advanced, &ConfigureInputAdvanced::CallCameraDialog, | 166 | connect(advanced, &ConfigureInputAdvanced::CallCameraDialog, [this, input_subsystem] { |
| 167 | [this, input_subsystem, &hid_core] { | 167 | CallConfigureDialog<ConfigureCamera>(*this, input_subsystem); |
| 168 | CallConfigureDialog<ConfigureCamera>(*this, input_subsystem); | 168 | }); |
| 169 | }); | ||
| 170 | 169 | ||
| 171 | connect(ui->vibrationButton, &QPushButton::clicked, | 170 | connect(ui->vibrationButton, &QPushButton::clicked, |
| 172 | [this, &hid_core] { CallConfigureDialog<ConfigureVibration>(*this, hid_core); }); | 171 | [this, &hid_core] { CallConfigureDialog<ConfigureVibration>(*this, hid_core); }); |
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 23245a976..e2c2b9292 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp | |||
| @@ -2000,7 +2000,7 @@ static bool RomFSRawCopy(QProgressDialog& dialog, const FileSys::VirtualDir& src | |||
| 2000 | } | 2000 | } |
| 2001 | 2001 | ||
| 2002 | void GMainWindow::OnGameListRemoveInstalledEntry(u64 program_id, InstalledEntryType type) { | 2002 | void GMainWindow::OnGameListRemoveInstalledEntry(u64 program_id, InstalledEntryType type) { |
| 2003 | const QString entry_type = [this, type] { | 2003 | const QString entry_type = [type] { |
| 2004 | switch (type) { | 2004 | switch (type) { |
| 2005 | case InstalledEntryType::Game: | 2005 | case InstalledEntryType::Game: |
| 2006 | return tr("Contents"); | 2006 | return tr("Contents"); |
| @@ -2097,7 +2097,7 @@ void GMainWindow::RemoveAddOnContent(u64 program_id, const QString& entry_type) | |||
| 2097 | 2097 | ||
| 2098 | void GMainWindow::OnGameListRemoveFile(u64 program_id, GameListRemoveTarget target, | 2098 | void GMainWindow::OnGameListRemoveFile(u64 program_id, GameListRemoveTarget target, |
| 2099 | const std::string& game_path) { | 2099 | const std::string& game_path) { |
| 2100 | const QString question = [this, target] { | 2100 | const QString question = [target] { |
| 2101 | switch (target) { | 2101 | switch (target) { |
| 2102 | case GameListRemoveTarget::GlShaderCache: | 2102 | case GameListRemoveTarget::GlShaderCache: |
| 2103 | return tr("Delete OpenGL Transferable Shader Cache?"); | 2103 | return tr("Delete OpenGL Transferable Shader Cache?"); |