Skip to content

Commit 2758496

Browse files
committed
src:arduino-timer: cpp style casts
Improves cast clarity.
1 parent 469d15e commit 2758496

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/arduino-timer.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ class Timer {
100100
}
101101
}
102102

103-
task = (Task)NULL;
103+
task = static_cast<Task>(NULL);
104104
}
105105

106106
/* Cancel all timer tasks */
@@ -223,7 +223,7 @@ class Timer {
223223
Task
224224
task_id(const struct task * const t)
225225
{
226-
const Task id = (Task)t;
226+
const Task id = reinterpret_cast<Task>(t);
227227

228228
return id ? id ^ t->id : id;
229229
}

0 commit comments

Comments
 (0)