From 372245e0b52a738148a9291fbe448e3c61fa07bd Mon Sep 17 00:00:00 2001 From: James Rowe Date: Mon, 21 Jan 2019 09:39:45 -0700 Subject: [PATCH] Fix mingw compile error and warnings --- src/yuzu/loading_screen.cpp | 10 +++++----- src/yuzu/loading_screen.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/yuzu/loading_screen.cpp b/src/yuzu/loading_screen.cpp index 76ef86b8c..8ac7f5059 100644 --- a/src/yuzu/loading_screen.cpp +++ b/src/yuzu/loading_screen.cpp @@ -120,8 +120,8 @@ void LoadingScreen::Prepare(Loader::AppLoader& loader) { map.loadFromData(buffer.data(), buffer.size()); ui->banner->setPixmap(map); #else - backing_mem = - std::make_unique(reinterpret_cast(buffer.data()), buffer.size()); + backing_mem = std::make_unique(reinterpret_cast(buffer.data()), + static_cast(buffer.size())); backing_buf = std::make_unique(backing_mem.get()); backing_buf->open(QIODevice::ReadOnly); animation = std::make_unique(backing_buf.get(), QByteArray()); @@ -132,7 +132,7 @@ void LoadingScreen::Prepare(Loader::AppLoader& loader) { } if (loader.ReadLogo(buffer) == Loader::ResultStatus::Success) { QPixmap map; - map.loadFromData(buffer.data(), buffer.size()); + map.loadFromData(buffer.data(), static_cast(buffer.size())); ui->logo->setPixmap(map); } @@ -163,7 +163,7 @@ void LoadingScreen::OnLoadProgress(VideoCore::LoadCallbackStage stage, std::size } // update the max of the progress bar if the number of shaders change if (total != previous_total) { - ui->progress_bar->setMaximum(total); + ui->progress_bar->setMaximum(static_cast(total)); previous_total = total; } @@ -192,7 +192,7 @@ void LoadingScreen::OnLoadProgress(VideoCore::LoadCallbackStage stage, std::size // update labels and progress bar ui->stage->setText(stage_translations[stage].arg(value).arg(total)); ui->value->setText(estimate); - ui->progress_bar->setValue(value); + ui->progress_bar->setValue(static_cast(value)); previous_time = now; } diff --git a/src/yuzu/loading_screen.h b/src/yuzu/loading_screen.h index 091e58eb7..801d08e1a 100644 --- a/src/yuzu/loading_screen.h +++ b/src/yuzu/loading_screen.h @@ -74,7 +74,7 @@ private: VideoCore::LoadCallbackStage previous_stage; QGraphicsOpacityEffect* opacity_effect = nullptr; - std::unique_ptr fadeout_animation = nullptr; + std::unique_ptr fadeout_animation; // Definitions for the differences in text and styling for each stage std::unordered_map progressbar_style;