From e55842f6aed77738d34134c38ec571c397ea04f9 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 15 May 2016 12:49:06 +0200 Subject: api/shortcuts: appease pointless compiler warnings --- opentrack/keybinding-worker.cpp | 2 +- opentrack/shortcuts.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'opentrack') diff --git a/opentrack/keybinding-worker.cpp b/opentrack/keybinding-worker.cpp index 8bb99b8c..a0c7178c 100644 --- a/opentrack/keybinding-worker.cpp +++ b/opentrack/keybinding-worker.cpp @@ -16,7 +16,7 @@ bool Key::should_process() { - if (!enabled || keycode == 0 && guid == "") + if (!enabled || (keycode == 0 && guid == "")) return false; bool ret = timer.elapsed_ms() > 100; timer.start(); diff --git a/opentrack/shortcuts.cpp b/opentrack/shortcuts.cpp index e1087008..4488065f 100644 --- a/opentrack/shortcuts.cpp +++ b/opentrack/shortcuts.cpp @@ -112,10 +112,10 @@ void Shortcuts::reload(const std::vector> &keys K k; bind_keyboard_shortcut(k, opts, held); keys.push_back(tt(k, [=](bool) -> void { fun(true); }, held)); +#ifndef _WIN32 const int idx = keys.size() - 1; tt& kk_ = keys[idx]; auto& fn = std::get<1>(kk_); -#ifndef _WIN32 connect(k.get(), &QxtGlobalShortcut::activated, [=]() -> void { fn(true); }); #endif } -- cgit v1.2.3