From df3a4580ea64b46a8b4b756b404dae36bffdfabf Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sat, 11 Feb 2017 20:18:02 -0500 Subject: [PATCH] Tilt: Use std::array for m_tilt --- Source/Core/InputCommon/ControllerEmu/ControlGroup/Tilt.cpp | 3 --- Source/Core/InputCommon/ControllerEmu/ControlGroup/Tilt.h | 3 ++- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Source/Core/InputCommon/ControllerEmu/ControlGroup/Tilt.cpp b/Source/Core/InputCommon/ControllerEmu/ControlGroup/Tilt.cpp index 5481d92606..1aaeab15e0 100644 --- a/Source/Core/InputCommon/ControllerEmu/ControlGroup/Tilt.cpp +++ b/Source/Core/InputCommon/ControllerEmu/ControlGroup/Tilt.cpp @@ -6,7 +6,6 @@ #include #include -#include #include #include @@ -19,8 +18,6 @@ namespace ControllerEmu { Tilt::Tilt(const std::string& name_) : ControlGroup(name_, GROUP_TYPE_TILT) { - memset(m_tilt, 0, sizeof(m_tilt)); - controls.emplace_back(std::make_unique("Forward")); controls.emplace_back(std::make_unique("Backward")); controls.emplace_back(std::make_unique("Left")); diff --git a/Source/Core/InputCommon/ControllerEmu/ControlGroup/Tilt.h b/Source/Core/InputCommon/ControllerEmu/ControlGroup/Tilt.h index 940d7d9722..78884f41ab 100644 --- a/Source/Core/InputCommon/ControllerEmu/ControlGroup/Tilt.h +++ b/Source/Core/InputCommon/ControllerEmu/ControlGroup/Tilt.h @@ -4,6 +4,7 @@ #pragma once +#include #include #include "InputCommon/ControllerEmu/ControlGroup/ControlGroup.h" @@ -17,6 +18,6 @@ public: void GetState(ControlState* x, ControlState* y, bool step = true); private: - ControlState m_tilt[2]; + std::array m_tilt{}; }; } // namespace ControllerEmu