diff options
author | David Robillard <d@drobilla.net> | 2025-01-21 09:28:03 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2025-01-21 09:34:23 -0500 |
commit | 98246e21ebf86db15cc848644bcd3e2827c5a2ca (patch) | |
tree | 8e4a24a0433218d096fd5af8fef2cfd7d336577f /src/x11.c | |
parent | 88759ddbcc4205c9b1a5021fe360bc052ae1dea3 (diff) | |
download | pugl-98246e21ebf86db15cc848644bcd3e2827c5a2ca.tar.gz pugl-98246e21ebf86db15cc848644bcd3e2827c5a2ca.tar.bz2 pugl-98246e21ebf86db15cc848644bcd3e2827c5a2ca.zip |
Add PUGL_KEY_NONE
This isn't a strict enumeration anyway, so a sentinel value does no harm, and
using it avoids warnings about testing an enum with no zero value.
Diffstat (limited to 'src/x11.c')
-rw-r--r-- | src/x11.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -814,13 +814,13 @@ keyInRange(const KeySym xSym, const PuglKey puglMin) { return (xSym >= xMin && xSym <= xMax) ? (PuglKey)(puglMin + (xSym - xMin)) - : (PuglKey)0; + : PUGL_KEY_NONE; } static PuglKey keySymToSpecial(const KeySym sym) { - PuglKey key = (PuglKey)0; + PuglKey key = PUGL_KEY_NONE; if ((key = keyInRange(sym, XK_F1, XK_F12, PUGL_KEY_F1)) || (key = keyInRange(sym, XK_Page_Up, XK_End, PUGL_KEY_PAGE_UP)) || (key = keyInRange(sym, XK_Home, XK_Down, PUGL_KEY_HOME)) || @@ -853,7 +853,7 @@ keySymToSpecial(const KeySym sym) } // clang-format on - return (PuglKey)0; + return PUGL_KEY_NONE; } static int |