From f5f35caf2073075687e9f44e619fcf958950f262 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 31 Dec 2018 19:11:29 -0500 Subject: [PATCH 1/2] yuzu/config: Silence truncation warnings --- src/yuzu/configuration/config.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/yuzu/configuration/config.cpp b/src/yuzu/configuration/config.cpp index c4349ccc8e..c6079acb88 100644 --- a/src/yuzu/configuration/config.cpp +++ b/src/yuzu/configuration/config.cpp @@ -680,7 +680,7 @@ void Config::SaveValues() { qt_config->setValue("title_id", QVariant::fromValue(elem.first)); qt_config->beginWriteArray("disabled"); for (std::size_t j = 0; j < elem.second.size(); ++j) { - qt_config->setArrayIndex(j); + qt_config->setArrayIndex(static_cast(j)); qt_config->setValue("d", QString::fromStdString(elem.second[j])); } qt_config->endArray(); From cd8924520c14068232df6ff0cc91bb604768cae7 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 31 Dec 2018 19:13:40 -0500 Subject: [PATCH 2/2] yuzu/configure_general: Silence truncation warnings in loadConfiguration() The QPixmap API expects an unsigned int. --- src/yuzu/configuration/configure_per_general.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/yuzu/configuration/configure_per_general.cpp b/src/yuzu/configuration/configure_per_general.cpp index dffaba5ed2..e13d2eac8a 100644 --- a/src/yuzu/configuration/configure_per_general.cpp +++ b/src/yuzu/configuration/configure_per_general.cpp @@ -120,7 +120,7 @@ void ConfigurePerGameGeneral::loadConfiguration() { QPixmap map; const auto bytes = control.second->ReadAllBytes(); - map.loadFromData(bytes.data(), bytes.size()); + map.loadFromData(bytes.data(), static_cast(bytes.size())); scene->addPixmap(map.scaled(ui->icon_view->width(), ui->icon_view->height(), Qt::IgnoreAspectRatio, Qt::SmoothTransformation)); @@ -130,7 +130,7 @@ void ConfigurePerGameGeneral::loadConfiguration() { scene->clear(); QPixmap map; - map.loadFromData(bytes.data(), bytes.size()); + map.loadFromData(bytes.data(), static_cast(bytes.size())); scene->addPixmap(map.scaled(ui->icon_view->width(), ui->icon_view->height(), Qt::IgnoreAspectRatio, Qt::SmoothTransformation));