Skip to content

Commit

Permalink
Remove unnecessary casts
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisThrasher committed Jan 3, 2025
1 parent c65de3c commit 4f0a785
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions imgui-SFML.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1112,12 +1112,12 @@ void initDefaultJoystickMapping()

void updateJoystickButtonState(ImGuiIO& io)
{
for (int i = 0; i < static_cast<int>(sf::Joystick::ButtonCount); ++i)
for (unsigned int i = 0; i < sf::Joystick::ButtonCount; ++i)
{
const ImGuiKey key = s_currWindowCtx->joystickMapping[i];
if (key != ImGuiKey_None)
{
const bool isPressed = sf::Joystick::isButtonPressed(s_currWindowCtx->joystickId, static_cast<unsigned>(i));
const bool isPressed = sf::Joystick::isButtonPressed(s_currWindowCtx->joystickId, i);
if (s_currWindowCtx->windowHasFocus || !isPressed)
{
io.AddKeyEvent(key, isPressed);
Expand Down

0 comments on commit 4f0a785

Please sign in to comment.