Skip to content

Commit ebf7197

Browse files
committed
use a proper name for the iterator variable
1 parent 20c0b61 commit ebf7197

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/arduino-timer.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -115,13 +115,13 @@ class TimerSet {
115115
TimerHandle
116116
add_timer(Timepoint start, Timepoint expires, Handler h, Timepoint repeat = 0)
117117
{
118-
if (auto timer = next_timer_slot(); timer != timers.end()) {
119-
timer->handler = h;
120-
timer->start = start;
121-
timer->expires = expires;
122-
timer->repeat = repeat;
118+
if (auto it = next_timer_slot(); it != timers.end()) {
119+
it->handler = h;
120+
it->start = start;
121+
it->expires = expires;
122+
it->repeat = repeat;
123123

124-
return TimerHandle(*timer);
124+
return TimerHandle(*it);
125125
}
126126
else {
127127
return TimerHandle();

0 commit comments

Comments
 (0)