aboutsummaryrefslogtreecommitdiff
path: root/src/input_common/gcadapter/gc_poller.cpp
diff options
context:
space:
mode:
authorAmeer <aj662@drexel.edu>2020-06-21 21:15:58 -0400
committerAmeer <aj662@drexel.edu>2020-06-21 21:17:46 -0400
commit968d631aa59a0a4e51e219eaa143d2b95593c3e7 (patch)
tree3429728a2848581b869a038a2da6499a2ca36952 /src/input_common/gcadapter/gc_poller.cpp
parent5f0fa4cb8283d61ad2993273fa48b2fd3868a680 (diff)
std::arrays where appropriate, clear q in adapter class, other touch ups
Diffstat (limited to 'src/input_common/gcadapter/gc_poller.cpp')
-rw-r--r--src/input_common/gcadapter/gc_poller.cpp16
1 files changed, 1 insertions, 15 deletions
diff --git a/src/input_common/gcadapter/gc_poller.cpp b/src/input_common/gcadapter/gc_poller.cpp
index 0e591baca2..ac4126cb62 100644
--- a/src/input_common/gcadapter/gc_poller.cpp
+++ b/src/input_common/gcadapter/gc_poller.cpp
@@ -56,9 +56,7 @@ GCButtonFactory::GCButtonFactory() {
adapter = GCAdapter::Adapter::GetInstance();
}
-GCButton::~GCButton() {
- // GCAdapter::Shutdown();
-}
+GCButton::~GCButton() = default;
std::unique_ptr<Input::ButtonDevice> GCButtonFactory::Create(const Common::ParamPackage& params) {
int button_id = params.Get("button", 0);
@@ -163,17 +161,11 @@ Common::ParamPackage GCButtonFactory::GetNextInput() {
void GCButtonFactory::BeginConfiguration() {
polling = true;
- for (int i = 0; i < 4; i++) {
- adapter->GetPadQueue()[i].Clear();
- }
adapter->BeginConfiguration();
}
void GCButtonFactory::EndConfiguration() {
polling = false;
- for (int i = 0; i < 4; i++) {
- adapter->GetPadQueue()[i].Clear();
- }
adapter->EndConfiguration();
}
@@ -265,17 +257,11 @@ std::unique_ptr<Input::AnalogDevice> GCAnalogFactory::Create(const Common::Param
void GCAnalogFactory::BeginConfiguration() {
polling = true;
- for (int i = 0; i < 4; i++) {
- adapter->GetPadQueue()[i].Clear();
- }
adapter->BeginConfiguration();
}
void GCAnalogFactory::EndConfiguration() {
polling = false;
- for (int i = 0; i < 4; i++) {
- adapter->GetPadQueue()[i].Clear();
- }
adapter->EndConfiguration();
}