aboutsummaryrefslogtreecommitdiffstats
path: root/src/win.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2025-01-21 09:28:03 -0500
committerDavid Robillard <d@drobilla.net>2025-01-21 09:34:23 -0500
commit98246e21ebf86db15cc848644bcd3e2827c5a2ca (patch)
tree8e4a24a0433218d096fd5af8fef2cfd7d336577f /src/win.c
parent88759ddbcc4205c9b1a5021fe360bc052ae1dea3 (diff)
downloadpugl-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.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/win.c b/src/win.c
index cae1a20..54981f7 100644
--- a/src/win.c
+++ b/src/win.c
@@ -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