diff options
| author | Lioncash <mathew1800@gmail.com> | 2017-02-11 20:21:43 -0500 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2017-02-11 20:22:50 -0500 |
| commit | 1a99e70ed78acb30719eb3c11f8f2e71185e89b4 (patch) | |
| tree | d2b72489e1c455ddf2993a98d5d19c07fdf93ba9 /Source/Core/InputCommon/ControllerEmu/ControlGroup | |
| parent | df3a4580ea64b46a8b4b756b404dae36bffdfabf (diff) | |
Force: Use std::array for m_swing
Diffstat (limited to 'Source/Core/InputCommon/ControllerEmu/ControlGroup')
| -rw-r--r-- | Source/Core/InputCommon/ControllerEmu/ControlGroup/Force.cpp | 3 | ||||
| -rw-r--r-- | Source/Core/InputCommon/ControllerEmu/ControlGroup/Force.h | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/Source/Core/InputCommon/ControllerEmu/ControlGroup/Force.cpp b/Source/Core/InputCommon/ControllerEmu/ControlGroup/Force.cpp index 29413ada2c..fba3fb6097 100644 --- a/Source/Core/InputCommon/ControllerEmu/ControlGroup/Force.cpp +++ b/Source/Core/InputCommon/ControllerEmu/ControlGroup/Force.cpp @@ -5,7 +5,6 @@ #include "InputCommon/ControllerEmu/ControlGroup/Force.h" #include <cmath> -#include <cstring> #include <memory> #include <string> @@ -19,8 +18,6 @@ namespace ControllerEmu { Force::Force(const std::string& name_) : ControlGroup(name_, GROUP_TYPE_FORCE) { - memset(m_swing, 0, sizeof(m_swing)); - controls.emplace_back(std::make_unique<Input>(_trans("Up"))); controls.emplace_back(std::make_unique<Input>(_trans("Down"))); controls.emplace_back(std::make_unique<Input>(_trans("Left"))); diff --git a/Source/Core/InputCommon/ControllerEmu/ControlGroup/Force.h b/Source/Core/InputCommon/ControllerEmu/ControlGroup/Force.h index 767009a1f8..f640b0d3b2 100644 --- a/Source/Core/InputCommon/ControllerEmu/ControlGroup/Force.h +++ b/Source/Core/InputCommon/ControllerEmu/ControlGroup/Force.h @@ -4,6 +4,7 @@ #pragma once +#include <array> #include <string> #include "InputCommon/ControllerEmu/ControlGroup/ControlGroup.h" @@ -17,6 +18,6 @@ public: void GetState(ControlState* axis); private: - ControlState m_swing[3]; + std::array<ControlState, 3> m_swing{}; }; } // namespace ControllerEmu |
