summaryrefslogtreecommitdiffhomepage
path: root/dinput/win32-joystick.hpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2019-01-14 16:21:56 +0100
committerStanislaw Halik <sthalik@misaki.pl>2019-01-16 07:49:10 +0100
commit42e6b27e1afda7fcd8beddd9676ba7edb6363a34 (patch)
tree43177e1c1f3bd07fc189f5038d76ecfafda754a5 /dinput/win32-joystick.hpp
parent28530b61616852785f144ab67f67d7df435f8ec6 (diff)
modernize only
- replace `static constexpr inline' with `static constexpr'. `inline' is implied. - use braced initializer lists where applicable - still missing `override' usages
Diffstat (limited to 'dinput/win32-joystick.hpp')
-rw-r--r--dinput/win32-joystick.hpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/dinput/win32-joystick.hpp b/dinput/win32-joystick.hpp
index 59ec0c49..331e4968 100644
--- a/dinput/win32-joystick.hpp
+++ b/dinput/win32-joystick.hpp
@@ -23,22 +23,22 @@
namespace win32_joy_impl {
-static constexpr inline unsigned max_buttons = std::size(DIJOYSTATE2().rgbButtons);
-static constexpr inline unsigned max_pov_hats = std::size(DIJOYSTATE2().rgdwPOV);
+static constexpr unsigned max_buttons = std::size(DIJOYSTATE2().rgbButtons);
+static constexpr unsigned max_pov_hats = std::size(DIJOYSTATE2().rgdwPOV);
-static constexpr inline unsigned pov_hat_directions = 8;
+static constexpr unsigned pov_hat_directions = 8;
// cf. https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ee416628(v=vs.85)
// see also remarks on the page
// no need to check for pos == unsigned(-1) || pos == 0xffff,
// this logic doesn't require that
-static constexpr inline unsigned value_per_pov_hat_direction = 36000 / pov_hat_directions;
-static constexpr inline unsigned max_buttons_and_pov_hats = max_buttons + max_pov_hats * pov_hat_directions;
+static constexpr unsigned value_per_pov_hat_direction = 36000 / pov_hat_directions;
+static constexpr unsigned max_buttons_and_pov_hats = max_buttons + max_pov_hats * pov_hat_directions;
//static_assert(pov_hat_directions == 4 || pov_hat_directions == 8);
// XXX how many axis update events can we reasonably get in a short time frame?
-static constexpr inline unsigned num_buffers = 16;
+static constexpr unsigned num_buffers = 16;
//#define WIN32_JOY_DEBUG
@@ -63,7 +63,7 @@ struct OTR_DINPUT_EXPORT win32_joy_ctx final
using joys_t = std::unordered_map<QString, std::shared_ptr<joy>>;
- static constexpr inline int joy_axis_size = 65536;
+ static constexpr int joy_axis_size = 65536;
struct joy_info
{