1
0
Fork 0

citra_qt/camera: silent signed array index warning (#4829)

This commit is contained in:
Weiyi Wang 2019-07-14 13:26:06 -04:00 committed by Ben
parent 32f832a81f
commit 1c5a55b3cb
2 changed files with 4 additions and 4 deletions

View File

@ -131,7 +131,7 @@ std::shared_ptr<QtMultimediaCameraHandler> 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> QtMultimediaCameraHandler::GetHandler
void QtMultimediaCameraHandler::ReleaseHandler(
const std::shared_ptr<Camera::QtMultimediaCameraHandler>& 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;
}

View File

@ -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);
}