Update formatting to clang-format 16 (#5370)

This commit is contained in:
Tyler Veness
2023-05-31 22:10:53 -07:00
committed by GitHub
parent a94a998002
commit 5fac18ff4a
48 changed files with 654 additions and 434 deletions

View File

@@ -124,7 +124,8 @@ class Command {
* @param duration the timeout duration
* @return the command with the timeout added
*/
[[nodiscard]] CommandPtr WithTimeout(units::second_t duration) &&;
[[nodiscard]]
CommandPtr WithTimeout(units::second_t duration) &&;
/**
* Decorates this command with an interrupt condition. If the specified
@@ -135,7 +136,8 @@ class Command {
* @param condition the interrupt condition
* @return the command with the interrupt condition added
*/
[[nodiscard]] CommandPtr Until(std::function<bool()> condition) &&;
[[nodiscard]]
CommandPtr Until(std::function<bool()> condition) &&;
/**
* Decorates this command with a run condition. If the specified condition
@@ -146,7 +148,8 @@ class Command {
* @param condition the interrupt condition
* @return the command with the interrupt condition added
*/
[[nodiscard]] CommandPtr OnlyWhile(std::function<bool()> condition) &&;
[[nodiscard]]
CommandPtr OnlyWhile(std::function<bool()> condition) &&;
/**
* Decorates this command with an interrupt condition. If the specified
@@ -159,7 +162,8 @@ class Command {
* @deprecated Replace with Until()
*/
WPI_DEPRECATED("Replace with Until()")
[[nodiscard]] CommandPtr WithInterrupt(std::function<bool()> condition) &&;
[[nodiscard]]
CommandPtr WithInterrupt(std::function<bool()> condition) &&;
/**
* Decorates this command with a runnable to run before this command starts.
@@ -168,9 +172,9 @@ class Command {
* @param requirements the required subsystems
* @return the decorated command
*/
[[nodiscard]] CommandPtr BeforeStarting(
std::function<void()> toRun,
std::initializer_list<Subsystem*> requirements) &&;
[[nodiscard]]
CommandPtr BeforeStarting(std::function<void()> toRun,
std::initializer_list<Subsystem*> requirements) &&;
/**
* Decorates this command with a runnable to run before this command starts.
@@ -179,9 +183,9 @@ class Command {
* @param requirements the required subsystems
* @return the decorated command
*/
[[nodiscard]] CommandPtr BeforeStarting(
std::function<void()> toRun,
std::span<Subsystem* const> requirements = {}) &&;
[[nodiscard]]
CommandPtr BeforeStarting(std::function<void()> toRun,
std::span<Subsystem* const> requirements = {}) &&;
/**
* Decorates this command with a runnable to run after the command finishes.
@@ -190,9 +194,9 @@ class Command {
* @param requirements the required subsystems
* @return the decorated command
*/
[[nodiscard]] CommandPtr AndThen(
std::function<void()> toRun,
std::initializer_list<Subsystem*> requirements) &&;
[[nodiscard]]
CommandPtr AndThen(std::function<void()> toRun,
std::initializer_list<Subsystem*> requirements) &&;
/**
* Decorates this command with a runnable to run after the command finishes.
@@ -201,9 +205,9 @@ class Command {
* @param requirements the required subsystems
* @return the decorated command
*/
[[nodiscard]] CommandPtr AndThen(
std::function<void()> toRun,
std::span<Subsystem* const> requirements = {}) &&;
[[nodiscard]]
CommandPtr AndThen(std::function<void()> toRun,
std::span<Subsystem* const> requirements = {}) &&;
/**
* Decorates this command to run perpetually, ignoring its ordinary end
@@ -231,7 +235,8 @@ safe) semantics.
*
* @return the decorated command
*/
[[nodiscard]] CommandPtr Repeatedly() &&;
[[nodiscard]]
CommandPtr Repeatedly() &&;
/**
* Decorates this command to run "by proxy" by wrapping it in a
@@ -243,7 +248,8 @@ safe) semantics.
*
* @return the decorated command
*/
[[nodiscard]] CommandPtr AsProxy() &&;
[[nodiscard]]
CommandPtr AsProxy() &&;
/**
* Decorates this command to only run if this condition is not met. If the
@@ -254,7 +260,8 @@ safe) semantics.
* @param condition the condition that will prevent the command from running
* @return the decorated command
*/
[[nodiscard]] CommandPtr Unless(std::function<bool()> condition) &&;
[[nodiscard]]
CommandPtr Unless(std::function<bool()> condition) &&;
/**
* Decorates this command to only run if this condition is met. If the command
@@ -265,7 +272,8 @@ safe) semantics.
* @param condition the condition that will allow the command to run
* @return the decorated command
*/
[[nodiscard]] CommandPtr OnlyIf(std::function<bool()> condition) &&;
[[nodiscard]]
CommandPtr OnlyIf(std::function<bool()> condition) &&;
/**
* Decorates this command to run or stop when disabled.
@@ -273,7 +281,8 @@ safe) semantics.
* @param doesRunWhenDisabled true to run when disabled.
* @return the decorated command
*/
[[nodiscard]] CommandPtr IgnoringDisable(bool doesRunWhenDisabled) &&;
[[nodiscard]]
CommandPtr IgnoringDisable(bool doesRunWhenDisabled) &&;
/**
* Decorates this command to run or stop when disabled.
@@ -281,7 +290,8 @@ safe) semantics.
* @param interruptBehavior true to run when disabled.
* @return the decorated command
*/
[[nodiscard]] CommandPtr WithInterruptBehavior(
[[nodiscard]]
CommandPtr WithInterruptBehavior(
Command::InterruptionBehavior interruptBehavior) &&;
/**
@@ -292,7 +302,8 @@ safe) semantics.
* command was interrupted.
* @return the decorated command
*/
[[nodiscard]] CommandPtr FinallyDo(std::function<void(bool)> end) &&;
[[nodiscard]]
CommandPtr FinallyDo(std::function<void(bool)> end) &&;
/**
* Decorates this command with a lambda to call on interrupt, following the
@@ -301,7 +312,8 @@ safe) semantics.
* @param handler a lambda to run when the command is interrupted
* @return the decorated command
*/
[[nodiscard]] CommandPtr HandleInterrupt(std::function<void()> handler) &&;
[[nodiscard]]
CommandPtr HandleInterrupt(std::function<void()> handler) &&;
/**
* Decorates this Command with a name.
@@ -309,7 +321,8 @@ safe) semantics.
* @param name name
* @return the decorated Command
*/
[[nodiscard]] CommandPtr WithName(std::string_view name) &&;
[[nodiscard]]
CommandPtr WithName(std::string_view name) &&;
/**
* Schedules this command.