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/win.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/win.c')
-rw-r--r-- | src/win.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -424,13 +424,13 @@ keyInRange(const WPARAM winSym, { return (winSym >= winMin && winSym <= winMax) ? (PuglKey)((WPARAM)puglMin + (winSym - winMin)) - : (PuglKey)0; + : PUGL_KEY_NONE; } static PuglKey keySymToSpecial(const WPARAM sym, const bool ext) { - PuglKey key = (PuglKey)0; + PuglKey key = PUGL_KEY_NONE; if ((key = keyInRange(sym, VK_F1, VK_F12, PUGL_KEY_F1)) || (key = keyInRange(sym, VK_PRIOR, @@ -479,7 +479,7 @@ keySymToSpecial(const WPARAM sym, const bool ext) // clang-format on } - return (PuglKey)0; + return PUGL_KEY_NONE; } static bool |