Skip to content

Commit

Permalink
refactor: Avoid implicit-signed-integer-truncation-or-sign-change in …
Browse files Browse the repository at this point in the history
…FreedesktopImage
  • Loading branch information
MarcoFalke committed Mar 21, 2024
1 parent 6d8eecd commit 321f105
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/qt/notificator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}

Expand Down

0 comments on commit 321f105

Please sign in to comment.