Use xrange for loops with simple identifier start and simple identifier end

s/for\s*(\s*\(\w\+\)\s\+\(\w\+\)\s*=\s*\([A-Za-z_0-9]\+\)\s*;\s*\2\s*!=\s*\([A-Za-z_0-9]\+\)u\?\s*;\s*\(++\s*\2\|\2\s*++\s*\))/range_for (const \1 \2, xrange(\3, \4))/
This commit is contained in:
Kp 2019-05-04 18:27:37 +00:00
parent a7806dde5d
commit a52d8106ce

View file

@ -119,8 +119,8 @@ static inline void gr_for_each_bitmap_byte(grs_canvas &canvas, const uint_fast32
auto src = bm.bm_data;
const auto ey = by + bm.bm_h;
const auto ex = bx + bm.bm_w;
for (auto iy = by; iy != ey; ++iy)
for (auto ix = bx; ix != ex; ++ix)
range_for (const auto iy, xrange(by, ey))
range_for (const auto ix, xrange(bx, ex))
f(canvas, src++, ix, iy);
}