Skip to content

Commit

Permalink
docs(display): 📝 Fix incorrect docs for error codes
Browse files Browse the repository at this point in the history
  • Loading branch information
ion098 committed Feb 3, 2025
1 parent 5ce9764 commit f584161
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
32 changes: 16 additions & 16 deletions include/gamepad/button.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ class Button {
*
* @param listenerName The name of the listener, this must be a unique name
* @param func The function to run when the button is pressed, the function MUST NOT block
* @return true The listener was successfully registered
* @return false The listener was not successfully registered (there is already a listener with this name)
* @return 0 The listener was successfully registered
* @return INT32_MAX The listener was not successfully registered (there is already a listener with this name)
*
* @b Example:
* @code {.cpp}
Expand All @@ -96,8 +96,8 @@ class Button {
*
* @param listenerName The name of the listener, this must be a unique name
* @param func The function to run when the button is long pressed, the function MUST NOT block
* @return true The listener was successfully registered
* @return false The listener was not successfully registered (there is already a listener with this name)
* @return 0 The listener was successfully registered
* @return INT32_MAX The listener was not successfully registered (there is already a listener with this name)
*
* @b Example:
* @code {.cpp}
Expand All @@ -114,8 +114,8 @@ class Button {
*
* @param listenerName The name of the listener, this must be a unique name
* @param func The function to run when the button is released, the function MUST NOT block
* @return true The listener was successfully registered
* @return false The listener was not successfully registered (there is already a listener with this name)
* @return 0 The listener was successfully registered
* @return INT32_MAX The listener was not successfully registered (there is already a listener with this name)
*
* @b Example:
* @code {.cpp}
Expand All @@ -136,8 +136,8 @@ class Button {
*
* @param listenerName The name of the listener, this must be a unique name
* @param func The function to run when the button is short released, the function MUST NOT block
* @return true The listener was successfully registered
* @return false The listener was not successfully registered (there is already a listener with this name)
* @return 0 The listener was successfully registered
* @return INT32_MAX The listener was not successfully registered (there is already a listener with this name)
*
* @b Example:
* @code {.cpp}
Expand All @@ -156,8 +156,8 @@ class Button {
*
* @param listenerName The name of the listener, this must be a unique name
* @param func The function to run when the button is long released, the function MUST NOT block
* @return true The listener was successfully registered
* @return false The listener was not successfully registered (there is already a listener with this name)
* @return 0 The listener was successfully registered
* @return INT32_MAX The listener was not successfully registered (there is already a listener with this name)
*
* @b Example:
* @code {.cpp}
Expand All @@ -177,8 +177,8 @@ class Button {
*
* @param listenerName The name of the listener, this must be a unique name
* @param func the function to run periodically when the button is held, the function MUST NOT block
* @return true The listener was successfully registered
* @return false The listener was not successfully registered (there is already a listener with this name)
* @return 0 The listener was successfully registered
* @return INT32_MAX The listener was not successfully registered (there is already a listener with this name)
*
* @b Example:
* @code {.cpp}
Expand All @@ -196,8 +196,8 @@ class Button {
* @param event Which event to register the listener on.
* @param listenerName The name of the listener, this must be a unique name
* @param func The function to run for the given event, the function MUST NOT block
* @return true The listener was successfully registered
* @return false The listener was not successfully registered (there is already a listener with this name)
* @return 0 The listener was successfully registered
* @return INT32_MAX The listener was not successfully registered (there is already a listener with this name)
*
* @b Example:
* @code {.cpp}
Expand All @@ -214,8 +214,8 @@ class Button {
*
* @param event the event type of the listener
* @param listenerName The name of the listener to remove
* @return true The specified listener was successfully removed
* @return false The specified listener could not be removed
* @return 0 The specified listener was successfully removed
* @return INT32_MAX The specified listener could not be removed
*
* @b Example:
* @code {.cpp}
Expand Down
6 changes: 3 additions & 3 deletions include/gamepad/event_handler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ template <typename Key, typename... Args> class EventHandler {
* @param key The listener key (this must be a unique key value)
* @param func The function to run when this event is fired
* @return 0 The listener was successfully added
* @return UINT32_MAX The listener was NOT successfully added (there is already a listener with the same key)
* @return INT32_MAX The listener was NOT successfully added (there is already a listener with the same key)
*/
int32_t addListener(Key key, Listener func) {
std::lock_guard lock(m_mutex);
Expand All @@ -40,7 +40,7 @@ template <typename Key, typename... Args> class EventHandler {
*
* @param key The listener key (this must be a unique key value)
* @return 0 The listener was successfully removed
* @return UINT32_MAX The listener was NOT successfully removed (there is no listener with the same key)
* @return INT32_MAX The listener was NOT successfully removed (there is no listener with the same key)
*/
int32_t removeListener(Key key) {
std::lock_guard lock(m_mutex);
Expand All @@ -54,7 +54,7 @@ template <typename Key, typename... Args> class EventHandler {
}

/**
* @brief Whther or not there are any listeners registered
* @brief Whether or not there are any listeners registered
*
* @return true There are listeners registered
* @return false There are no listeners registered
Expand Down

0 comments on commit f584161

Please sign in to comment.