mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
[commands] Mark CommandPtr class as [[nodiscard]] (#7803)
This has the same effect but makes it so any user code returning CommandPtr can't discard a returned command. Signed-off-by: Eric Ward <ezeward4@gmail.com>
This commit is contained in:
@@ -82,7 +82,6 @@ class DriveSubsystem : public frc2::SubsystemBase {
|
||||
* @param distance The distance to drive forward.
|
||||
* @return A command.
|
||||
*/
|
||||
[[nodiscard]]
|
||||
frc2::CommandPtr ProfiledDriveDistance(units::meter_t distance);
|
||||
|
||||
/**
|
||||
@@ -92,7 +91,6 @@ class DriveSubsystem : public frc2::SubsystemBase {
|
||||
* @param distance The distance to drive forward.
|
||||
* @return A command.
|
||||
*/
|
||||
[[nodiscard]]
|
||||
frc2::CommandPtr DynamicProfiledDriveDistance(units::meter_t distance);
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user