Remove deprecated code (#8656)

This commit is contained in:
Gold856
2026-03-15 00:28:31 -04:00
committed by GitHub
parent f1adce4cf7
commit d1fba06851
52 changed files with 10 additions and 1135 deletions

View File

@@ -152,10 +152,6 @@ CommandPtr Command::WithName(std::string_view name) && {
return std::move(*this).ToPtr().WithName(name);
}
void Command::Schedule() {
CommandScheduler::GetInstance().Schedule(this);
}
void Command::Cancel() {
CommandScheduler::GetInstance().Cancel(this);
}

View File

@@ -176,15 +176,6 @@ CommandPtr CommandPtr::WithDeadline(CommandPtr&& deadline) && {
return std::move(*this);
}
CommandPtr CommandPtr::DeadlineWith(CommandPtr&& parallel) && {
AssertValid();
std::vector<std::unique_ptr<Command>> vec;
vec.emplace_back(std::move(parallel).Unwrap());
m_ptr =
std::make_unique<ParallelDeadlineGroup>(std::move(m_ptr), std::move(vec));
return std::move(*this);
}
CommandPtr CommandPtr::DeadlineFor(CommandPtr&& parallel) && {
AssertValid();
std::vector<std::unique_ptr<Command>> vec;
@@ -268,11 +259,6 @@ std::unique_ptr<Command> CommandPtr::Unwrap() && {
return std::move(m_ptr);
}
void CommandPtr::Schedule() const& {
AssertValid();
CommandScheduler::GetInstance().Schedule(*this);
}
void CommandPtr::Cancel() const& {
AssertValid();
CommandScheduler::GetInstance().Cancel(*this);

View File

@@ -21,7 +21,6 @@
#include "wpi/commands2/WaitCommand.hpp"
#include "wpi/commands2/WaitUntilCommand.hpp"
#include "wpi/util/FunctionExtras.hpp"
#include "wpi/util/deprecated.hpp"
using namespace wpi::cmd;

View File

@@ -9,23 +9,10 @@
#include <fmt/format.h>
#include "wpi/util/deprecated.hpp"
#include "wpi/util/sendable/SendableBuilder.hpp"
using namespace wpi::cmd;
WPI_IGNORE_DEPRECATED
ProxyCommand::ProxyCommand(wpi::util::unique_function<Command*()> supplier)
: m_supplier(std::move(supplier)) {}
ProxyCommand::ProxyCommand(wpi::util::unique_function<CommandPtr()> supplier)
: ProxyCommand([supplier = std::move(supplier),
holder = std::optional<CommandPtr>{}]() mutable {
holder = supplier();
return holder->get();
}) {}
WPI_UNIGNORE_DEPRECATED
ProxyCommand::ProxyCommand(Command* command)
: m_supplier([command] { return command; }) {
SetName(fmt::format("Proxy({})", command->GetName()));