Force: Use std::array for m_swing

This commit is contained in:
Lioncash 2017-02-11 20:21:43 -05:00
parent df3a4580ea
commit 1a99e70ed7
2 changed files with 2 additions and 4 deletions

View File

@ -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")));

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* axis);
private:
ControlState m_swing[3];
std::array<ControlState, 3> m_swing{};
};
} // namespace ControllerEmu