summaryrefslogtreecommitdiffhomepage
path: root/dinput
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2018-07-08 23:20:56 +0200
committerStanislaw Halik <sthalik@misaki.pl>2018-07-08 23:20:56 +0200
commit90940a774eab876c38d5cef981b4be5bae67a462 (patch)
tree2e60edc1719ffd53752a55a7f0444166965e90c5 /dinput
parente3292e1ddaa8d69eb320d2700fc582b4675cf8ce (diff)
modernize only
Diffstat (limited to 'dinput')
-rw-r--r--dinput/keybinding-worker.cpp2
-rw-r--r--dinput/win32-joystick.hpp17
2 files changed, 4 insertions, 15 deletions
diff --git a/dinput/keybinding-worker.cpp b/dinput/keybinding-worker.cpp
index c7547107..9c2b06d4 100644
--- a/dinput/keybinding-worker.cpp
+++ b/dinput/keybinding-worker.cpp
@@ -16,7 +16,7 @@
#include <windows.h>
-Key::Key() {}
+Key::Key() = default;
bool Key::should_process()
{
diff --git a/dinput/win32-joystick.hpp b/dinput/win32-joystick.hpp
index a6a4edc9..757a9706 100644
--- a/dinput/win32-joystick.hpp
+++ b/dinput/win32-joystick.hpp
@@ -7,34 +7,24 @@
*/
#pragma once
-#ifdef _WIN32
-
#include "dinput.hpp"
#include "compat/timer.hpp"
+#include "compat/qhash.hpp"
#include "export.hpp"
+
#include <cstring>
#include <memory>
#include <vector>
#include <functional>
#include <algorithm>
#include <unordered_map>
+
#include <QString>
#include <QDebug>
#include <QMutex>
#include <QMutexLocker>
#include <QWidget>
-namespace std {
-template<>
-struct hash<QString>
-{
- inline std::size_t operator()(const QString& value) const
- {
- return qHash(value);
- }
-};
-}
-
struct OTR_DINPUT_EXPORT win32_joy_ctx final
{
using fn = std::function<void(const QString& guid, int btn, bool held)>;
@@ -102,4 +92,3 @@ private:
static enum_state enumerator;
};
-#endif