Skip to content

Commit

Permalink
fix switch formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
ion098 committed May 27, 2024
1 parent f4d01f3 commit 8466e2c
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/gamepad/controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ uint32_t Button::addListener(EventType event, std::function<void(void)> func) co
case Gamepad::EventType::ON_LONG_PRESS: return this->onLongPress(std::move(func));
case Gamepad::EventType::ON_RELEASE: return this->onRelease(std::move(func));
default:
TODO("add error logging")
errno = EINVAL;
return 0;
TODO("add error logging")
errno = EINVAL;
return 0;
}
}

Expand Down Expand Up @@ -81,9 +81,9 @@ float Controller::operator[](pros::controller_analog_e_t axis) {
case ANALOG_RIGHT_X: return this->RightX;
case ANALOG_RIGHT_Y: return this->RightY;
default:
TODO("add error logging")
errno = EINVAL;
return 0;
TODO("add error logging")
errno = EINVAL;
return 0;
}
}

Expand All @@ -102,9 +102,9 @@ Button Controller::*Controller::button_to_ptr(pros::controller_digital_e_t butto
case DIGITAL_Y: return &Controller::Y;
case DIGITAL_A: return &Controller::A; TODO("change handling for default")
default:
TODO("add error logging")
errno = EINVAL;
return &Controller::Fake;
TODO("add error logging")
errno = EINVAL;
return &Controller::Fake;
}
}
} // namespace Gamepad

0 comments on commit 8466e2c

Please sign in to comment.