switch to unsigned int which is more correct and more efficient

As suggested by Maato, martinhath, dcousens, and drfuchs.

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2021-11-01 09:49:29 -07:00
parent b582cc576e
commit d70fe3699d

View File

@ -2115,10 +2115,10 @@ void _glfwSetWindowIconX11(_GLFWwindow* window, int count, const GLFWimage* imag
for (int j = 0; j < images[i].width * images[i].height; j++)
{
*target++ = (((long)images[i].pixels[j * 4 + 0]) << 16) |
(((long)images[i].pixels[j * 4 + 1]) << 8) |
(((long)images[i].pixels[j * 4 + 2]) << 0) |
(((long)images[i].pixels[j * 4 + 3]) << 24);
*target++ = (((unsigned int)images[i].pixels[j * 4 + 0]) << 16) |
(((unsigned int)images[i].pixels[j * 4 + 1]) << 8) |
(((unsigned int)images[i].pixels[j * 4 + 2]) << 0) |
(((unsigned int)images[i].pixels[j * 4 + 3]) << 24);
}
}