summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Lioncash2018-08-10 18:15:06 -0400
committerGravatar Lioncash2018-08-10 18:19:44 -0400
commit8eb97706b869b2c07ac915600f41345c7fdc6479 (patch)
tree0d077fd2f4a58e492c1a42b91c58e26fc14ecce9 /src
parentgt/game_list: Use std::array in GameListItemPath's data() function (diff)
downloadyuzu-8eb97706b869b2c07ac915600f41345c7fdc6479.tar.gz
yuzu-8eb97706b869b2c07ac915600f41345c7fdc6479.tar.xz
yuzu-8eb97706b869b2c07ac915600f41345c7fdc6479.zip
qt/game_list: Resolve truncation warning within GameListItemPath's constructor
Silences a warning about truncating from size_t to u32
Diffstat (limited to 'src')
-rw-r--r--src/yuzu/game_list_p.h8
1 files 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:
40 * If this class receives valid SMDH data, it will also display game icons and titles. 40 * If this class receives valid SMDH data, it will also display game icons and titles.
41 */ 41 */
42class GameListItemPath : public GameListItem { 42class GameListItemPath : public GameListItem {
43
44public: 43public:
45 static const int FullPathRole = Qt::UserRole + 1; 44 static const int FullPathRole = Qt::UserRole + 1;
46 static const int TitleRole = Qt::UserRole + 2; 45 static const int TitleRole = Qt::UserRole + 2;
@@ -55,11 +54,12 @@ public:
55 setData(qulonglong(program_id), ProgramIdRole); 54 setData(qulonglong(program_id), ProgramIdRole);
56 setData(game_type, FileTypeRole); 55 setData(game_type, FileTypeRole);
57 56
57 const u32 size = UISettings::values.icon_size;
58
58 QPixmap picture; 59 QPixmap picture;
59 u32 size = UISettings::values.icon_size; 60 if (!picture.loadFromData(picture_data.data(), static_cast<u32>(picture_data.size()))) {
60 if (!picture.loadFromData(picture_data.data(), picture_data.size()))
61 picture = GetDefaultIcon(size); 61 picture = GetDefaultIcon(size);
62 62 }
63 picture = picture.scaled(size, size); 63 picture = picture.scaled(size, size);
64 64
65 setData(picture, Qt::DecorationRole); 65 setData(picture, Qt::DecorationRole);