Skip to content

Commit 4f0a785

Browse files
committed
Remove unnecessary casts
1 parent c65de3c commit 4f0a785

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

imgui-SFML.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1112,12 +1112,12 @@ void initDefaultJoystickMapping()
11121112

11131113
void updateJoystickButtonState(ImGuiIO& io)
11141114
{
1115-
for (int i = 0; i < static_cast<int>(sf::Joystick::ButtonCount); ++i)
1115+
for (unsigned int i = 0; i < sf::Joystick::ButtonCount; ++i)
11161116
{
11171117
const ImGuiKey key = s_currWindowCtx->joystickMapping[i];
11181118
if (key != ImGuiKey_None)
11191119
{
1120-
const bool isPressed = sf::Joystick::isButtonPressed(s_currWindowCtx->joystickId, static_cast<unsigned>(i));
1120+
const bool isPressed = sf::Joystick::isButtonPressed(s_currWindowCtx->joystickId, i);
11211121
if (s_currWindowCtx->windowHasFocus || !isPressed)
11221122
{
11231123
io.AddKeyEvent(key, isPressed);

0 commit comments

Comments
 (0)