mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-22 01:11: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:
@@ -8,7 +8,7 @@
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include <wpi/ArrayRef.h>
|
||||
#include <wpi/span.h>
|
||||
|
||||
#include "frc2/command/CommandBase.h"
|
||||
|
||||
@@ -25,10 +25,19 @@ class CommandGroupBase : public CommandBase {
|
||||
* Requires that the specified command not have been already allocated to a
|
||||
* CommandGroup. Reports an error if the command is already grouped.
|
||||
*
|
||||
* @param commands The command to check
|
||||
* @param command The command to check
|
||||
* @return True if all the command is ungrouped.
|
||||
*/
|
||||
static bool RequireUngrouped(Command& command);
|
||||
static bool RequireUngrouped(const Command& command);
|
||||
|
||||
/**
|
||||
* Requires that the specified command not have been already allocated to a
|
||||
* CommandGroup. Reports an error if the command is already grouped.
|
||||
*
|
||||
* @param command The command to check
|
||||
* @return True if all the command is ungrouped.
|
||||
*/
|
||||
static bool RequireUngrouped(const Command* command);
|
||||
|
||||
/**
|
||||
* Requires that the specified commands not have been already allocated to a
|
||||
@@ -37,7 +46,7 @@ class CommandGroupBase : public CommandBase {
|
||||
* @param commands The commands to check
|
||||
* @return True if all the commands are ungrouped.
|
||||
*/
|
||||
static bool RequireUngrouped(wpi::ArrayRef<std::unique_ptr<Command>>);
|
||||
static bool RequireUngrouped(wpi::span<const std::unique_ptr<Command>>);
|
||||
|
||||
/**
|
||||
* Requires that the specified commands not have been already allocated to a
|
||||
@@ -46,7 +55,7 @@ class CommandGroupBase : public CommandBase {
|
||||
* @param commands The commands to check
|
||||
* @return True if all the commands are ungrouped.
|
||||
*/
|
||||
static bool RequireUngrouped(std::initializer_list<Command*>);
|
||||
static bool RequireUngrouped(std::initializer_list<const Command*>);
|
||||
|
||||
/**
|
||||
* Adds the given commands to the command group.
|
||||
|
||||
Reference in New Issue
Block a user