We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 116ee63 commit d22fc3aCopy full SHA for d22fc3a
1 file changed
src/support/intervals.cpp
@@ -45,7 +45,9 @@ IntervalProcessor::filterOverlaps(std::vector<Interval>& intervals) {
45
continue;
46
}
47
48
- // Former overlaps with candidate. Replace former if the weights are the same but the candidate ends earlier.
+ // When two intervals overlap with the same weight, prefer to keep the
49
+ // interval that ends sooner under the presumption that it will overlap with
50
+ // fewer subsequent intervals.
51
if (former.first.weight == candidate.first.weight &&
52
former.first.end > candidate.first.end) {
53
former = candidate;
0 commit comments