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:
@@ -9,7 +9,7 @@
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
|
||||
#include <wpi/ArrayRef.h>
|
||||
#include <wpi/span.h>
|
||||
|
||||
#include "frc2/command/Command.h"
|
||||
#include "frc2/command/CommandScheduler.h"
|
||||
@@ -101,7 +101,7 @@ class Trigger {
|
||||
* @paaram requirements the required subsystems.
|
||||
*/
|
||||
Trigger WhenActive(std::function<void()> toRun,
|
||||
wpi::ArrayRef<Subsystem*> requirements = {});
|
||||
wpi::span<Subsystem* const> requirements = {});
|
||||
|
||||
/**
|
||||
* Binds a command to be started repeatedly while the trigger is active, and
|
||||
@@ -161,7 +161,7 @@ class Trigger {
|
||||
* @param requirements the required subsystems.
|
||||
*/
|
||||
Trigger WhileActiveContinous(std::function<void()> toRun,
|
||||
wpi::ArrayRef<Subsystem*> requirements = {});
|
||||
wpi::span<Subsystem* const> requirements = {});
|
||||
|
||||
/**
|
||||
* Binds a command to be started when the trigger becomes active, and
|
||||
@@ -261,7 +261,7 @@ class Trigger {
|
||||
* @param requirements the required subsystems.
|
||||
*/
|
||||
Trigger WhenInactive(std::function<void()> toRun,
|
||||
wpi::ArrayRef<Subsystem*> requirements = {});
|
||||
wpi::span<Subsystem* const> requirements = {});
|
||||
|
||||
/**
|
||||
* Binds a command to start when the trigger becomes active, and be canceled
|
||||
|
||||
Reference in New Issue
Block a user