Use xrange for loops with constant numerical start and simple identifier end
s/for\s*(\s*\(\w\+\)\s\+\(\w\+\)\s*=\s*\([0-9]\+\)u\?\s*;\s*\2\s*!=\s*\([A-Za-z_0-9]\+\)u\?\s*;\s*\(++\s*\2\|\2\s*++\s*\))/range_for (const \1 \2, xrange(\3u, \4))/
This commit is contained in:
parent
3bd10610fc
commit
a7806dde5d
|
@ -210,7 +210,7 @@ static void check_weapon_reorder(array<ubyte, N> &w)
|
|||
if (m != ((1 << N) | ((1 << (N - 1)) - 1)))
|
||||
{
|
||||
w[0] = 255;
|
||||
for (uint_fast32_t i = 1; i != N; ++i)
|
||||
range_for (const uint_fast32_t i, xrange(1u, N))
|
||||
w[i] = i - 1;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue