Skip to content

Commit

Permalink
Use the correct type in a for loop
Browse files Browse the repository at this point in the history
The `sizeof()` operator has the type `size_t`, so the `for` loop
iterating over it should use the same type.

Closes glfw#1614.
  • Loading branch information
Luflosi authored and elmindreda committed Dec 26, 2019
1 parent 4ec7daf commit 74a46df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cocoa_joystick.m
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ void _glfwInitJoysticksNS(void)
return;
}

for (int i = 0; i < sizeof(usages) / sizeof(long); i++)
for (size_t i = 0; i < sizeof(usages) / sizeof(long); i++)
{
const long page = kHIDPage_GenericDesktop;

Expand Down

0 comments on commit 74a46df

Please sign in to comment.