Skip to content

Commit

Permalink
Fix -Wsign-compare
Browse files Browse the repository at this point in the history
  • Loading branch information
jhasse committed Sep 15, 2023
1 parent 3e62409 commit 02d044a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/win32/windowimpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -682,8 +682,8 @@ void Window::SetIcon(const std::string& filename) {

auto bgra =
std::make_unique<char[]>(imageData->getWidth() * imageData->getHeight() * CHANNELS);
for (size_t x = 0; x < imageData->getWidth(); ++x) {
for (size_t y = 0; y < imageData->getHeight(); ++y) {
for (size_t x = 0; x < static_cast<size_t>(imageData->getWidth()); ++x) {
for (size_t y = 0; y < static_cast<size_t>(imageData->getHeight()); ++y) {
// transform RGBA to BGRA:
bgra[y * imageData->getWidth() * CHANNELS + x * CHANNELS] =
imageData->pixels()[y * imageData->getWidth() * CHANNELS + x * CHANNELS + 2];
Expand Down

0 comments on commit 02d044a

Please sign in to comment.