Skip to content

Commit

Permalink
Force: Use std::array for m_swing
Browse files Browse the repository at this point in the history
  • Loading branch information
lioncash committed Feb 12, 2017
1 parent df3a458 commit 1a99e70
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 0 additions & 3 deletions Source/Core/InputCommon/ControllerEmu/ControlGroup/Force.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#include "InputCommon/ControllerEmu/ControlGroup/Force.h"

#include <cmath>
#include <cstring>
#include <memory>
#include <string>

Expand All @@ -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")));
Expand Down
3 changes: 2 additions & 1 deletion Source/Core/InputCommon/ControllerEmu/ControlGroup/Force.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

#pragma once

#include <array>
#include <string>
#include "InputCommon/ControllerEmu/ControlGroup/ControlGroup.h"

Expand All @@ -17,6 +18,6 @@ class Force : public ControlGroup
void GetState(ControlState* axis);

private:
ControlState m_swing[3];
std::array<ControlState, 3> m_swing{};
};
} // namespace ControllerEmu

0 comments on commit 1a99e70

Please sign in to comment.