Skip to content

Commit

Permalink
fix compile error, move ControllerInit ctor and dtor to _impl namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
ion098 committed May 29, 2024
1 parent 3ded296 commit 6321e53
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/gamepad/controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Controller& master = master_buf.as_controller;
ControllerBuf partner_buf {};
Controller& partner = partner_buf.as_controller;

ControllerInit::ControllerInit() {
_impl::ControllerInit::ControllerInit() {
// only initialize once, if we're the first ControllerInit instance
if (nifty_counter == 0) {
new (&master_buf.as_controller) Controller(pros::E_CONTROLLER_MASTER);
Expand All @@ -30,7 +30,7 @@ ControllerInit::ControllerInit() {
++nifty_counter;
}

ControllerInit::~ControllerInit() {
_impl::ControllerInit::~ControllerInit() {
--nifty_counter;
// only destroy if we're the last ControllerInit instance
if (nifty_counter == 0) {
Expand Down

0 comments on commit 6321e53

Please sign in to comment.