mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
Reduce scope of for loop variables to for loop initializer (#517)
This commit is contained in:
committed by
Fred Silberberg
parent
dbe821baee
commit
a5cd24e7ea
@@ -49,8 +49,7 @@ void Subsystem::SetDefaultCommand(Command* command) {
|
||||
} else {
|
||||
bool found = false;
|
||||
Command::SubsystemSet requirements = command->GetRequirements();
|
||||
auto iter = requirements.begin();
|
||||
for (; iter != requirements.end(); iter++) {
|
||||
for (auto iter = requirements.begin(); iter != requirements.end(); iter++) {
|
||||
if (*iter == this) {
|
||||
found = true;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user