diff options
author | Loïc Blot <nerzhul@users.noreply.github.com> | 2017-08-15 20:30:30 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-15 20:30:30 +0200 |
commit | 9dd0f952e09471f15f59a98c1ae650d99499cd77 (patch) | |
tree | ef600d29b8b753353657ac6740d47208dd0e5d09 /src/client/joystick_controller.h | |
parent | 64c7a689ad8a596f6b72afe200d9ced20cdd9630 (diff) | |
download | minetest-9dd0f952e09471f15f59a98c1ae650d99499cd77.tar.gz minetest-9dd0f952e09471f15f59a98c1ae650d99499cd77.tar.bz2 minetest-9dd0f952e09471f15f59a98c1ae650d99499cd77.zip |
Modernize client code (#6250)
* Various code style fixes
* Use range based for loops
* Use empty instead of empty objects
* Use C++11 default keyword for trivial constructors and destructors
* Drop some useless casts
* Use emplace_back instead of push_back to improve performance of some vectors push
Diffstat (limited to 'src/client/joystick_controller.h')
-rw-r--r-- | src/client/joystick_controller.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/client/joystick_controller.h b/src/client/joystick_controller.h index baec4e412..4a2cdf555 100644 --- a/src/client/joystick_controller.h +++ b/src/client/joystick_controller.h @@ -52,7 +52,8 @@ struct JoystickCombination { struct JoystickButtonCmb : public JoystickCombination { - JoystickButtonCmb() {} + JoystickButtonCmb() = default; + JoystickButtonCmb(GameKeyType key, u32 filter_mask, u32 compare_mask) : filter_mask(filter_mask), compare_mask(compare_mask) @@ -68,7 +69,8 @@ struct JoystickButtonCmb : public JoystickCombination { struct JoystickAxisCmb : public JoystickCombination { - JoystickAxisCmb() {} + JoystickAxisCmb() = default; + JoystickAxisCmb(GameKeyType key, u16 axis_to_compare, int direction, s16 thresh) : axis_to_compare(axis_to_compare), direction(direction), |