T offset = ps->first, prev_offset;
bool first = true;
while (1) {
if (first)
first = false;
else
assert(offset > prev_offset);
pl = l.find_inc(offset);
prev_offset = offset;
if (pl == l.m.end())
break;
while (ps != s.m.end() && ps->first + ps->second <= pl->first)
++ps;
if (ps == s.m.end())
break;
offset = pl->first + pl->second;
if (offset <= ps->first) {
offset = ps->first;
continue;
}
}
// I got [-Wunused-but-set-variable] warning of "prev_offset", is there any better way to solve it except adding cout << prev_offset;
after prev_offset = offset;
? Any answer is appreciate, thanks in advance.