WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 491224e

Browse files
committed
Remove unnecessary casts
1 parent b3d8394 commit 491224e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

imgui-SFML.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1144,12 +1144,12 @@ void initDefaultJoystickMapping()
11441144

11451145
void updateJoystickButtonState(ImGuiIO& io)
11461146
{
1147-
for (int i = 0; i < static_cast<int>(sf::Joystick::ButtonCount); ++i)
1147+
for (unsigned int i = 0; i < sf::Joystick::ButtonCount; ++i)
11481148
{
11491149
const ImGuiKey key = s_currWindowCtx->joystickMapping[i];
11501150
if (key != ImGuiKey_None)
11511151
{
1152-
const bool isPressed = sf::Joystick::isButtonPressed(s_currWindowCtx->joystickId, static_cast<unsigned>(i));
1152+
const bool isPressed = sf::Joystick::isButtonPressed(s_currWindowCtx->joystickId, i);
11531153
if (s_currWindowCtx->windowHasFocus || !isPressed)
11541154
{
11551155
io.AddKeyEvent(key, isPressed);

0 commit comments

Comments
 (0)