From 1c5a55b3cb1c4c5e24d9df13eff8e0c7e5c3c366 Mon Sep 17 00:00:00 2001 From: Weiyi Wang Date: Sun, 14 Jul 2019 13:26:06 -0400 Subject: [PATCH] citra_qt/camera: silent signed array index warning (#4829) --- src/citra_qt/camera/qt_multimedia_camera.cpp | 6 +++--- src/citra_qt/configuration/configure_camera.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/citra_qt/camera/qt_multimedia_camera.cpp b/src/citra_qt/camera/qt_multimedia_camera.cpp index 1c9d07f76..0e977cc6e 100644 --- a/src/citra_qt/camera/qt_multimedia_camera.cpp +++ b/src/citra_qt/camera/qt_multimedia_camera.cpp @@ -131,7 +131,7 @@ std::shared_ptr QtMultimediaCameraHandler::GetHandler if (loaded.count(camera_name)) { return loaded.at(camera_name); } - for (int i = 0; i < handlers.size(); i++) { + for (std::size_t i = 0; i < handlers.size(); i++) { if (!status[i]) { LOG_INFO(Service_CAM, "Successfully got handler {}", i); status[i] = true; @@ -145,7 +145,7 @@ std::shared_ptr QtMultimediaCameraHandler::GetHandler void QtMultimediaCameraHandler::ReleaseHandler( const std::shared_ptr& handler) { - for (int i = 0; i < handlers.size(); i++) { + for (std::size_t i = 0; i < handlers.size(); i++) { if (handlers[i] == handler) { LOG_INFO(Service_CAM, "Successfully released handler {}", i); status[i] = false; @@ -217,7 +217,7 @@ void QtMultimediaCameraHandler::ResumeCameras() { void QtMultimediaCameraHandler::ReleaseHandlers() { StopCameras(); LOG_INFO(Service_CAM, "Releasing all handlers"); - for (int i = 0; i < handlers.size(); i++) { + for (std::size_t i = 0; i < handlers.size(); i++) { status[i] = false; handlers[i]->started = false; } diff --git a/src/citra_qt/configuration/configure_camera.cpp b/src/citra_qt/configuration/configure_camera.cpp index c9b447153..76fe904fa 100644 --- a/src/citra_qt/configuration/configure_camera.cpp +++ b/src/citra_qt/configuration/configure_camera.cpp @@ -241,7 +241,7 @@ void ConfigureCamera::timerEvent(QTimerEvent* event) { void ConfigureCamera::SetConfiguration() { int index = GetSelectedCameraIndex(); - for (int i = 0; i < Implementations.size(); i++) { + for (std::size_t i = 0; i < Implementations.size(); i++) { if (Implementations[i] == camera_name[index]) { ui->image_source->setCurrentIndex(i); }