diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2020-03-11 21:01:02 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2020-03-11 21:44:56 +0100 |
commit | 1c2f2a805d99c92e0a8b72dae462018b0bd277c4 (patch) | |
tree | 634f3dd798c04f9c8cb9e6b4df451e65f0169dac /platform | |
parent | 5b97db325ac487e4d4f27686b70fa3d4fe6eb181 (diff) |
typedefs: Cleanup unused macros and unnecessary checks
We now require a compiler with C++17 support, so we don't need to
check for features added to GCC 5 or Clang 3.2.
Clang builtin availability checks were unused anyway as Clang defines
`__GNUC__` as it's also a GNU C implementation.
Fixes #36986.
Diffstat (limited to 'platform')
-rw-r--r-- | platform/x11/os_x11.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp index c74981fd55..ddb5237d1b 100644 --- a/platform/x11/os_x11.cpp +++ b/platform/x11/os_x11.cpp @@ -2012,8 +2012,10 @@ void OS_X11::handle_key_event(XKeyEvent *p_event, bool p_echo) { // is correct, but the xorg developers are // not very helpful today. - ::Time tresh = ABSDIFF(peek_event.xkey.time, xkeyevent->time); - if (peek_event.type == KeyPress && tresh < 5) { +#define ABSDIFF(x, y) (((x) < (y)) ? ((y) - (x)) : ((x) - (y))) + ::Time threshold = ABSDIFF(peek_event.xkey.time, xkeyevent->time); +#undef ABSDIFF + if (peek_event.type == KeyPress && threshold < 5) { KeySym rk; XLookupString((XKeyEvent *)&peek_event, str, 256, &rk, NULL); if (rk == keysym_keycode) { |