From 34c787422da0524eba147cabb18dec152d0b2e51 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Tue, 24 Oct 2017 18:09:22 +0200 Subject: dinput: use c++14-style initializers --- dinput/keybinding-worker.cpp | 2 ++ dinput/keybinding-worker.hpp | 14 +++++++------- 2 files changed, 9 insertions(+), 7 deletions(-) (limited to 'dinput') diff --git a/dinput/keybinding-worker.cpp b/dinput/keybinding-worker.cpp index dbe3d75e..e0d09909 100644 --- a/dinput/keybinding-worker.cpp +++ b/dinput/keybinding-worker.cpp @@ -15,6 +15,8 @@ #include #include +Key::Key() {} + bool Key::should_process() { if (!enabled || (keycode == 0 && guid == "")) diff --git a/dinput/keybinding-worker.hpp b/dinput/keybinding-worker.hpp index 6ed277cd..d35ac57d 100644 --- a/dinput/keybinding-worker.hpp +++ b/dinput/keybinding-worker.hpp @@ -24,15 +24,15 @@ struct OTR_DINPUT_EXPORT Key { QString guid; - int keycode; - bool shift; - bool ctrl; - bool alt; - bool held; - bool enabled; + int keycode = 0; + bool shift = false; + bool ctrl = false; + bool alt = false; + bool held = true; + bool enabled = true; Timer timer; public: - Key() : keycode(0), shift(false), ctrl(false), alt(false), held(true), enabled(true) {} + Key(); bool should_process(); }; -- cgit v1.2.3