diff --git a/src/SFML/Window/DRM/InputImplUDev.cpp b/src/SFML/Window/DRM/InputImplUDev.cpp index 242a7d2e9..a45b836ee 100644 --- a/src/SFML/Window/DRM/InputImplUDev.cpp +++ b/src/SFML/Window/DRM/InputImplUDev.cpp @@ -412,7 +412,7 @@ namespace event.key.shift = shiftDown(); event.key.system = systemDown(); - keyMap[kb] = inputEvent.value; + keyMap[static_cast(kb)] = inputEvent.value; if (special && inputEvent.value) doDeferredText = special; @@ -493,7 +493,7 @@ namespace // // We only clear the ICANON flag for the time of reading - newTerminalConfig.c_lflag &= ~(tcflag_t)ICANON; + newTerminalConfig.c_lflag &= ~static_cast(ICANON); tcsetattr(STDIN_FILENO, TCSANOW, &newTerminalConfig); timeval timeout; @@ -564,7 +564,7 @@ bool InputImpl::isKeyPressed(Keyboard::Key key) return false; update(); - return keyMap[key]; + return keyMap[static_cast(key)]; } @@ -692,8 +692,8 @@ void InputImpl::setTerminalConfig() tcgetattr(STDIN_FILENO, &newTerminalConfig); // get current terminal config oldTerminalConfig = newTerminalConfig; // create a backup - newTerminalConfig.c_lflag &= ~(tcflag_t)ECHO; // disable console feedback - newTerminalConfig.c_lflag &= ~(tcflag_t)ISIG; // disable signals + newTerminalConfig.c_lflag &= ~static_cast(ECHO); // disable console feedback + newTerminalConfig.c_lflag &= ~static_cast(ISIG); // disable signals newTerminalConfig.c_lflag |= ICANON; // disable noncanonical mode newTerminalConfig.c_iflag |= IGNCR; // ignore carriage return tcsetattr(STDIN_FILENO, TCSANOW, &newTerminalConfig); // set our new config