mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
Clean up new C++ commands (#2027)
- Remove use of std::set. The only place std::set was actually used was in ParallelRaceGroup, but this was of minimal utility as ParallelRaceGroup checked for duplicate subsystem requirements, so it would be very unusual to end up with duplicate commands in any case; replaced it with a vector. - Remove use of std::unordered_map except for SelectCommand. Replaced with vector. - Use pImpl idiom for CommandScheduler - Minimize include files (remove unnecessary ones) - Reformat include file order for consistency
This commit is contained in:
@@ -7,19 +7,10 @@
|
||||
|
||||
#include "frc2/command/CommandGroupBase.h"
|
||||
|
||||
#include <set>
|
||||
|
||||
#include "frc/WPIErrors.h"
|
||||
#include "frc2/command/ParallelCommandGroup.h"
|
||||
#include "frc2/command/ParallelDeadlineGroup.h"
|
||||
#include "frc2/command/ParallelRaceGroup.h"
|
||||
#include "frc2/command/SequentialCommandGroup.h"
|
||||
#include <frc/WPIErrors.h>
|
||||
|
||||
using namespace frc2;
|
||||
template <typename TMap, typename TKey>
|
||||
static bool ContainsKey(const TMap& map, TKey keyToCheck) {
|
||||
return map.find(keyToCheck) != map.end();
|
||||
}
|
||||
|
||||
bool CommandGroupBase::RequireUngrouped(Command& command) {
|
||||
if (command.IsGrouped()) {
|
||||
wpi_setGlobalWPIErrorWithContext(
|
||||
|
||||
Reference in New Issue
Block a user