From a18fe083cc91bee442863c8ab7f97d6549f2b75c Mon Sep 17 00:00:00 2001 From: Paul Cornett Date: Wed, 7 Sep 2016 21:38:28 -0700 Subject: [PATCH] avoid implicit conversion to bool --- src/unix/utilsx11.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/unix/utilsx11.cpp b/src/unix/utilsx11.cpp index cc57df7a29..3fb74fc9e3 100644 --- a/src/unix/utilsx11.cpp +++ b/src/unix/utilsx11.cpp @@ -2577,7 +2577,7 @@ static bool wxGetKeyStateX11(wxKeyCode key) // with the least-significant bit in the byte representing key 8N. char key_vector[32]; XQueryKeymap(pDisplay, key_vector); - return key_vector[keyCode >> 3] & (1 << (keyCode & 7)); + return (key_vector[keyCode >> 3] & (1 << (keyCode & 7))) != 0; } #endif // !defined(__WXGTK__) || defined(GDK_WINDOWING_X11) @@ -2618,7 +2618,7 @@ static bool wxGetKeyStateGTK(wxKeyCode key) wxFAIL_MSG(wxS("Unsupported key, only modifiers can be used")); return false; } - return state & mask; + return (state & mask) != 0; } #endif // GTK+ 3.4