Skip to content

Commit

Permalink
Simplify removing range
Browse files Browse the repository at this point in the history
The logic remains the same.
  • Loading branch information
neverwin authored and PeterMatula committed Dec 5, 2022
1 parent 8df9937 commit 5a3a9e2
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions include/retdec/common/range.h
Original file line number Diff line number Diff line change
Expand Up @@ -428,12 +428,9 @@ class RangeContainer
{
--pos; // Move to previous no matter what.
}
while (pos != _ranges.end() && pos->getStart() <= r.getEnd())
while (pos != _ranges.end() && pos->getStart() < r.getEnd())
{
if (pos->contains(r.getStart())
|| pos->contains(r.getEnd())
|| r.contains(pos->getStart())
|| r.contains(pos->getEnd()))
if (r.getStart() < pos->getEnd())
{
RangeType old = *pos;

Expand Down

0 comments on commit 5a3a9e2

Please sign in to comment.