From 7d898e638abad8267420f8c0d827d21f716b8977 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Thu, 1 Aug 2019 14:07:00 +0200 Subject: fix clang warnings --- qxt-mini/qxtglobalshortcut_x11.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'qxt-mini') diff --git a/qxt-mini/qxtglobalshortcut_x11.cpp b/qxt-mini/qxtglobalshortcut_x11.cpp index 89a5e7a8..6647d803 100644 --- a/qxt-mini/qxtglobalshortcut_x11.cpp +++ b/qxt-mini/qxtglobalshortcut_x11.cpp @@ -69,6 +69,9 @@ using pair = QPair; struct keybinding final { + keybinding(const keybinding&) = default; + keybinding& operator=(const keybinding&) = default; + quint32 code, mods; int refcnt; @@ -361,6 +364,8 @@ bool QxtGlobalShortcutPrivate::nativeEventFilter(const QByteArray & eventType, bool is_release = false; + static_assert(std::is_same_v); + xcb_key_press_event_t *kev = nullptr; if (eventType == "xcb_generic_event_t") { xcb_generic_event_t *ev = static_cast(message); @@ -368,10 +373,11 @@ bool QxtGlobalShortcutPrivate::nativeEventFilter(const QByteArray & eventType, { case XCB_KEY_RELEASE: is_release = true; - /*FALLTHROUGH*/ + [[fallthrough]]; case XCB_KEY_PRESS: kev = static_cast(message); - /*FALLTHROUGH*/ + break; + default: break; } -- cgit v1.2.3