Tilt: Use std::array for m_tilt

This commit is contained in:
Lioncash 2017-02-11 20:18:02 -05:00
parent 0e961776e6
commit df3a4580ea
2 changed files with 2 additions and 4 deletions

View file

@ -6,7 +6,6 @@
#include <algorithm>
#include <cmath>
#include <cstring>
#include <memory>
#include <string>
@ -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<Input>("Forward"));
controls.emplace_back(std::make_unique<Input>("Backward"));
controls.emplace_back(std::make_unique<Input>("Left"));

View file

@ -4,6 +4,7 @@
#pragma once
#include <array>
#include <string>
#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<ControlState, 2> m_tilt{};
};
} // namespace ControllerEmu