mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-25 01:41:43 +00:00
[commands] Deprecate Command.schedule() (#7072)
It's only syntactic sugar over the CommandScheduler's schedule method and creates a footgun because it’s too obvious to try to use in incorrect places. Co-authored-by: Starlight220 <53231611+Starlight220@users.noreply.github.com>
This commit is contained in:
@@ -277,7 +277,10 @@ CommandPtr final {
|
||||
|
||||
/**
|
||||
* Schedules this command.
|
||||
*
|
||||
* @deprecated Use CommandScheduler::GetInstance().Schedule() instead
|
||||
*/
|
||||
[[deprecated("Use CommandScheduler::GetInstance().Schedule() instead.")]]
|
||||
void Schedule() const&;
|
||||
|
||||
// Prevent calls on a temporary, as the returned pointer would be invalid
|
||||
|
||||
Reference in New Issue
Block a user