summaryrefslogtreecommitdiffstats
path: root/src/MxcImageProvider.cpp
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2022-10-26 01:10:35 +0200
committerNicolas Werner <nicolas.werner@hotmail.de>2022-10-26 01:10:35 +0200
commitb28fa86e6ab633b2d3d9bfdb4642c661ff8c45fc (patch)
treee3500273bcd79fc9e6389e8dcc626607a2677678 /src/MxcImageProvider.cpp
parent5be8298d0a183ffe9205910d24aaae6e0062d926 (diff)
Enable -Wconversion
Diffstat (limited to 'src/MxcImageProvider.cpp')
-rw-r--r--src/MxcImageProvider.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/MxcImageProvider.cpp b/src/MxcImageProvider.cpp
index 3022ca3d..26ffb934 100644
--- a/src/MxcImageProvider.cpp
+++ b/src/MxcImageProvider.cpp
@@ -169,8 +169,9 @@ MxcImageProvider::download(const QString &id,
mtx::http::ThumbOpts opts;
opts.mxc_url = "mxc://" + id.toStdString();
- opts.width = requestedSize.width() > 0 ? requestedSize.width() : -1;
- opts.height = requestedSize.height() > 0 ? requestedSize.height() : -1;
+ opts.width = static_cast<uint8_t>(requestedSize.width() > 0 ? requestedSize.width() : -1);
+ opts.height =
+ static_cast<uint8_t>(requestedSize.height() > 0 ? requestedSize.height() : -1);
opts.method = crop ? "crop" : "scale";
http::client()->get_thumbnail(
opts,