Skip to content

Commit e8c93ce

Browse files
committed
Fix old-style cast warning
1 parent 8ee0b9c commit e8c93ce

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

include/cli/detail/linuxkeyboard.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,12 @@ class LinuxKeyboard : public InputDevice
117117

118118
void ToManualMode()
119119
{
120+
constexpr tcflag_t ICANON_FLAG = ICANON;
121+
constexpr tcflag_t ECHO_FLAG = ECHO;
122+
120123
tcgetattr( STDIN_FILENO, &oldt );
121124
newt = oldt;
122-
newt.c_lflag &= ~( (tcflag_t)ICANON | (tcflag_t)ECHO );
125+
newt.c_lflag &= ~( ICANON_FLAG | ECHO_FLAG );
123126
tcsetattr( STDIN_FILENO, TCSANOW, &newt );
124127
}
125128
void ToStandardMode()

0 commit comments

Comments
 (0)