diff options
| author | Stanislaw Halik <sthalik@misaki.pl> | 2017-10-24 18:09:22 +0200 | 
|---|---|---|
| committer | Stanislaw Halik <sthalik@misaki.pl> | 2017-10-27 16:42:59 +0200 | 
| commit | 34c787422da0524eba147cabb18dec152d0b2e51 (patch) | |
| tree | 76e34abbb43dd56c99a7267c4a6b04efdb35ae89 /dinput | |
| parent | fcafbe06947bf24f9c9ac2811dcbd123a672a380 (diff) | |
dinput: use c++14-style initializers
Diffstat (limited to 'dinput')
| -rw-r--r-- | dinput/keybinding-worker.cpp | 2 | ||||
| -rw-r--r-- | dinput/keybinding-worker.hpp | 14 | 
2 files changed, 9 insertions, 7 deletions
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 <QDebug>  #include <QMutexLocker> +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();  };  | 
