diff --git a/wpilibNewCommands/src/main/native/cpp/frc2/command/Commands.cpp b/wpilibNewCommands/src/main/native/cpp/frc2/command/Commands.cpp index 564c6c3702..2ecd9b2ddc 100644 --- a/wpilibNewCommands/src/main/native/cpp/frc2/command/Commands.cpp +++ b/wpilibNewCommands/src/main/native/cpp/frc2/command/Commands.cpp @@ -14,7 +14,6 @@ #include "frc2/command/PrintCommand.h" #include "frc2/command/ProxyScheduleCommand.h" #include "frc2/command/RunCommand.h" -#include "frc2/command/SelectCommand.h" #include "frc2/command/SequentialCommandGroup.h" #include "frc2/command/WaitCommand.h" #include "frc2/command/WaitUntilCommand.h" @@ -100,14 +99,6 @@ CommandPtr cmd::Either(CommandPtr&& onTrue, CommandPtr&& onFalse, .ToPtr(); } -template -CommandPtr cmd::Select(std::function selector, - std::vector> commands) { - return SelectCommand(std::move(selector), - CommandPtr::UnwrapVector(std::move(commands))) - .ToPtr(); -} - CommandPtr cmd::Sequence(std::vector&& commands) { return SequentialCommandGroup(CommandPtr::UnwrapVector(std::move(commands))) .ToPtr(); diff --git a/wpilibNewCommands/src/main/native/include/frc2/command/Commands.h b/wpilibNewCommands/src/main/native/include/frc2/command/Commands.h index c1703825ad..fabbd764e0 100644 --- a/wpilibNewCommands/src/main/native/include/frc2/command/Commands.h +++ b/wpilibNewCommands/src/main/native/include/frc2/command/Commands.h @@ -12,6 +12,7 @@ #include #include "frc2/command/CommandPtr.h" +#include "frc2/command/SelectCommand.h" namespace frc2 { class Subsystem; @@ -158,7 +159,11 @@ namespace cmd { template [[nodiscard]] CommandPtr Select( std::function selector, - std::vector> commands); + std::vector> commands) { + return SelectCommand(std::move(selector), + CommandPtr::UnwrapVector(std::move(commands))) + .ToPtr(); +} // Command Groups