Skip to content

Commit

Permalink
style: 🎨 Format code
Browse files Browse the repository at this point in the history
  • Loading branch information
ion098 committed Jan 22, 2025
1 parent 5a5fced commit f127b09
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion include/gamepad/gamepad.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ class Gamepad {
* @return std::string A unique listener name
*/
static std::string uniqueName();
static Button Gamepad::*buttonToPtr(pros::controller_digital_e_t button);
static Button Gamepad::* buttonToPtr(pros::controller_digital_e_t button);
void updateButton(pros::controller_digital_e_t button_id);

void updateScreens();
Expand Down
2 changes: 1 addition & 1 deletion include/gamepad/screens/alertScreen.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class AlertScreen : public AbstractScreen {
*
* @return 0 if the alert was added successfully
* @return INT32_MAX if there was an error, setting errno
*
*
*/
int32_t addAlerts(uint8_t line, std::string strs, uint32_t duration, std::string rumble = "");
private:
Expand Down
4 changes: 2 additions & 2 deletions src/gamepad/gamepad.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Gamepad::Gamepad(pros::controller_id_e_t id)
}

void Gamepad::updateButton(pros::controller_digital_e_t button_id) {
Button Gamepad::*button = Gamepad::buttonToPtr(button_id);
Button Gamepad::* button = Gamepad::buttonToPtr(button_id);
bool is_held = m_controller.get_digital(button_id);
(this->*button).update(is_held);
}
Expand Down Expand Up @@ -155,7 +155,7 @@ std::string Gamepad::uniqueName() {
return std::to_string(i++) + "_internal";
}

Button Gamepad::*Gamepad::buttonToPtr(pros::controller_digital_e_t button) {
Button Gamepad::* Gamepad::buttonToPtr(pros::controller_digital_e_t button) {
switch (button) {
case pros::E_CONTROLLER_DIGITAL_L1: return &Gamepad::m_L1;
case pros::E_CONTROLLER_DIGITAL_L2: return &Gamepad::m_L2;
Expand Down

0 comments on commit f127b09

Please sign in to comment.