mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
Use wpi::span instead of wpi::ArrayRef across all libraries (#3414)
- Remove ArrayRef.h - Add SpanExtras.h for a couple of convenience functions
This commit is contained in:
@@ -20,7 +20,7 @@ Button Button::WhenPressed(std::function<void()> toRun,
|
||||
}
|
||||
|
||||
Button Button::WhenPressed(std::function<void()> toRun,
|
||||
wpi::ArrayRef<Subsystem*> requirements) {
|
||||
wpi::span<Subsystem* const> requirements) {
|
||||
WhenActive(std::move(toRun), requirements);
|
||||
return *this;
|
||||
}
|
||||
@@ -37,7 +37,7 @@ Button Button::WhileHeld(std::function<void()> toRun,
|
||||
}
|
||||
|
||||
Button Button::WhileHeld(std::function<void()> toRun,
|
||||
wpi::ArrayRef<Subsystem*> requirements) {
|
||||
wpi::span<Subsystem* const> requirements) {
|
||||
WhileActiveContinous(std::move(toRun), requirements);
|
||||
return *this;
|
||||
}
|
||||
@@ -59,7 +59,7 @@ Button Button::WhenReleased(std::function<void()> toRun,
|
||||
}
|
||||
|
||||
Button Button::WhenReleased(std::function<void()> toRun,
|
||||
wpi::ArrayRef<Subsystem*> requirements) {
|
||||
wpi::span<Subsystem* const> requirements) {
|
||||
WhenInactive(std::move(toRun), requirements);
|
||||
return *this;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user