aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>2024-03-21 19:33:10 +0100
committerMarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>2024-03-21 19:33:10 +0100
commit321f105d08ddf958881908ea57ad263ffdccd225 (patch)
tree154ff52a2f8fa5cfd644f6d870ddfc353d617961 /src
parent6d8eecd33a521ea9016be3714d53ea4729b955e6 (diff)
refactor: Avoid implicit-signed-integer-truncation-or-sign-change in FreedesktopImage
Diffstat (limited to 'src')
-rw-r--r--src/qt/notificator.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/qt/notificator.cpp b/src/qt/notificator.cpp
index 2021e5f9dc..551c0ffd13 100644
--- a/src/qt/notificator.cpp
+++ b/src/qt/notificator.cpp
@@ -112,10 +112,10 @@ FreedesktopImage::FreedesktopImage(const QImage &img):
for(unsigned int ptr = 0; ptr < num_pixels; ++ptr)
{
- image[ptr*BYTES_PER_PIXEL+0] = data[ptr] >> 16; // R
- image[ptr*BYTES_PER_PIXEL+1] = data[ptr] >> 8; // G
- image[ptr*BYTES_PER_PIXEL+2] = data[ptr]; // B
- image[ptr*BYTES_PER_PIXEL+3] = data[ptr] >> 24; // A
+ image[ptr * BYTES_PER_PIXEL + 0] = char(data[ptr] >> 16); // R
+ image[ptr * BYTES_PER_PIXEL + 1] = char(data[ptr] >> 8); // G
+ image[ptr * BYTES_PER_PIXEL + 2] = char(data[ptr]); // B
+ image[ptr * BYTES_PER_PIXEL + 3] = char(data[ptr] >> 24); // A
}
}