1
0
Fork 0
forked from suyu/suyu

Merge pull request #1969 from lioncash/cast

yuzu: Fix truncation warnings within UI code
This commit is contained in:
bunnei 2019-01-02 17:20:52 -05:00 committed by GitHub
commit dd0b17a5f0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -680,7 +680,7 @@ void Config::SaveValues() {
qt_config->setValue("title_id", QVariant::fromValue<u64>(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<int>(j));
qt_config->setValue("d", QString::fromStdString(elem.second[j]));
}
qt_config->endArray();

View file

@ -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<u32>(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<u32>(bytes.size()));
scene->addPixmap(map.scaled(ui->icon_view->width(), ui->icon_view->height(),
Qt::IgnoreAspectRatio, Qt::SmoothTransformation));