Commit 786b35b2 authored by Jacob Vosmaer's avatar Jacob Vosmaer

Make double var for loop more readable

parent 1c6a9983
......@@ -68,8 +68,11 @@ poly2_update_playing(void)
}
}
uint8_t want_play_i = 0;
for (uint8_t j = want_play->head; (want_play_i < NUM_VOICES) && (j != want_play->sup); want_play_i++, (j = l_succ(want_play, j))) {
for (
uint8_t i = 0, j = want_play->head;
(i < NUM_VOICES) && (j != want_play->sup);
i++, (j = l_succ(want_play, j))
) {
if (poly2_is_playing(j)) {
continue;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment