Simplify cg_mark_range further
This commit is contained in:
parent
1de5f06f83
commit
1613b42411
@ -212,13 +212,11 @@ bool cg_reverse_marks(arg_t _)
|
|||||||
|
|
||||||
bool cg_mark_range(arg_t _)
|
bool cg_mark_range(arg_t _)
|
||||||
{
|
{
|
||||||
int d = markidx < fileidx ? 1 : -1;
|
int d = markidx < fileidx ? 1 : -1, end, i;
|
||||||
bool dirty = false, on = !!(files[markidx].flags & FF_MARK);
|
bool dirty = false, on = !!(files[markidx].flags & FF_MARK);
|
||||||
|
|
||||||
while (markidx != fileidx) {
|
for (i = markidx + d, end = fileidx + d; i != end; i += d)
|
||||||
if (mark_image(markidx + d, on))
|
dirty |= mark_image(i, on);
|
||||||
dirty = true;
|
|
||||||
}
|
|
||||||
return dirty;
|
return dirty;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user