diff --git a/wpilibNewCommands/src/main/native/include/frc2/command/Command.h b/wpilibNewCommands/src/main/native/include/frc2/command/Command.h index 7bb6213e75f..27f5f184072 100644 --- a/wpilibNewCommands/src/main/native/include/frc2/command/Command.h +++ b/wpilibNewCommands/src/main/native/include/frc2/command/Command.h @@ -432,6 +432,7 @@ class Command : public wpi::Sendable, public wpi::SendableHelper { * Transfers ownership of this command to a unique pointer. Used for * decorator methods. */ + [[deprecated("Use ToPtr() instead")]] virtual std::unique_ptr TransferOwnership() && = 0; std::optional m_previousComposition; diff --git a/wpilibNewCommands/src/main/native/include/frc2/command/CommandHelper.h b/wpilibNewCommands/src/main/native/include/frc2/command/CommandHelper.h index ed93b655f99..ba6fe920b8b 100644 --- a/wpilibNewCommands/src/main/native/include/frc2/command/CommandHelper.h +++ b/wpilibNewCommands/src/main/native/include/frc2/command/CommandHelper.h @@ -8,6 +8,8 @@ #include #include +#include + #include "frc2/command/Command.h" #include "frc2/command/CommandPtr.h" @@ -34,6 +36,7 @@ class CommandHelper : public Base { } protected: + WPI_DEPRECATED("Use ToPtr() instead") std::unique_ptr TransferOwnership() && override { return std::make_unique(std::move(*static_cast(this))); } diff --git a/wpilibNewCommands/src/main/native/include/frc2/command/SelectCommand.h b/wpilibNewCommands/src/main/native/include/frc2/command/SelectCommand.h index 4c2ba66fdeb..cc311063b4f 100644 --- a/wpilibNewCommands/src/main/native/include/frc2/command/SelectCommand.h +++ b/wpilibNewCommands/src/main/native/include/frc2/command/SelectCommand.h @@ -17,6 +17,7 @@ #include #include +#include #include #include "frc2/command/Command.h" @@ -134,6 +135,7 @@ class SelectCommand : public CommandHelper> { } protected: + WPI_DEPRECATED("Use ToPtr() instead") std::unique_ptr TransferOwnership() && override { return std::make_unique(std::move(*this)); }