diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/.clang-tidy | 1 | ||||
-rw-r--r-- | src/mac.m | 4 | ||||
-rw-r--r-- | src/win.c | 6 | ||||
-rw-r--r-- | src/x11.c | 6 |
4 files changed, 8 insertions, 9 deletions
diff --git a/src/.clang-tidy b/src/.clang-tidy index 6d51f06..cfc824d 100644 --- a/src/.clang-tidy +++ b/src/.clang-tidy @@ -4,7 +4,6 @@ Checks: > -bugprone-easily-swappable-parameters, -bugprone-multi-level-implicit-pointer-conversion, - -clang-analyzer-optin.core.EnumCastOutOfRange, -hicpp-multiway-paths-covered, -hicpp-signed-bitwise, -llvm-header-guard, @@ -463,7 +463,7 @@ keySymToSpecial(const NSEvent* const ev) return PUGL_KEY_PAD_9; } - return (PuglKey)0; + return PUGL_KEY_NONE; } - (void)updateTrackingAreas @@ -856,7 +856,7 @@ flagDiffers(const uint32_t lhs, const uint32_t rhs, const uint32_t mask) - (void)flagsChanged:(NSEvent*)event { const uint32_t mods = getModifiers(event); - PuglKey special = (PuglKey)0; + PuglKey special = PUGL_KEY_NONE; const uint16_t keyCode = [event keyCode]; if (flagDiffers(mods, puglview->impl->mods, PUGL_MOD_SHIFT)) { @@ -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 @@ -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 |