mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-25 01:41:43 +00:00
Clean up Command container iteration code (#73)
This commit is contained in:
committed by
Peter Johnson
parent
ea7d11b1db
commit
b7807bf9d2
@@ -195,7 +195,7 @@ class Command : public ErrorBase, public SendableBase {
|
||||
* @return The requirements (as an std::set of Subsystem pointers) of this
|
||||
* command
|
||||
*/
|
||||
SubsystemSet GetRequirements() const;
|
||||
const SubsystemSet& GetRequirements() const;
|
||||
|
||||
/**
|
||||
* Returns the CommandGroup that this command is a part of.
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <list>
|
||||
#include <vector>
|
||||
|
||||
#include <wpi/Twine.h>
|
||||
@@ -169,7 +168,7 @@ class CommandGroup : public Command {
|
||||
std::vector<CommandGroupEntry> m_commands;
|
||||
|
||||
// The active children in this group (stored in entries)
|
||||
std::list<CommandGroupEntry> m_children;
|
||||
std::vector<CommandGroupEntry*> m_children;
|
||||
|
||||
// The current command, -1 signifies that none have been run
|
||||
int m_currentCommandIndex = -1;
|
||||
|
||||
@@ -97,7 +97,7 @@ class Scheduler : public ErrorBase, public SendableBase {
|
||||
|
||||
Command::SubsystemSet m_subsystems;
|
||||
wpi::mutex m_buttonsMutex;
|
||||
typedef std::vector<ButtonScheduler*> ButtonVector;
|
||||
typedef std::vector<std::unique_ptr<ButtonScheduler>> ButtonVector;
|
||||
ButtonVector m_buttons;
|
||||
typedef std::vector<Command*> CommandVector;
|
||||
wpi::mutex m_additionsMutex;
|
||||
|
||||
Reference in New Issue
Block a user