From 8eb97706b869b2c07ac915600f41345c7fdc6479 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Fri, 10 Aug 2018 18:15:06 -0400 Subject: qt/game_list: Resolve truncation warning within GameListItemPath's constructor Silences a warning about truncating from size_t to u32 --- src/yuzu/game_list_p.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/yuzu/game_list_p.h b/src/yuzu/game_list_p.h index 039c7dc67..8fe5e8b80 100644 --- a/src/yuzu/game_list_p.h +++ b/src/yuzu/game_list_p.h @@ -40,7 +40,6 @@ public: * If this class receives valid SMDH data, it will also display game icons and titles. */ class GameListItemPath : public GameListItem { - public: static const int FullPathRole = Qt::UserRole + 1; static const int TitleRole = Qt::UserRole + 2; @@ -55,11 +54,12 @@ public: setData(qulonglong(program_id), ProgramIdRole); setData(game_type, FileTypeRole); + const u32 size = UISettings::values.icon_size; + QPixmap picture; - u32 size = UISettings::values.icon_size; - if (!picture.loadFromData(picture_data.data(), picture_data.size())) + if (!picture.loadFromData(picture_data.data(), static_cast(picture_data.size()))) { picture = GetDefaultIcon(size); - + } picture = picture.scaled(size, size); setData(picture, Qt::DecorationRole); -- cgit v1.2.3