-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This bug occurs if: * A span needs to be subliced at the end of an in-progress span * Another shorter span exists at the same poisitiotion * That span ends before the in-progress span does An exammple would look roughly like this: D |--| C |-------| B |----------| A |---------| Because spans at the same position are sorted in the descending order, the largest span (B) is processed first and subslicing is started. The current code then moves the start of all subslices at the same position to the end of the of the in-progress span (A). This is correctt in many cases (like C) where the spans at the same poistion extend past the end of the in-progress span (A). However if any spans (C) are shorted than the in-progress span (A), the start of these slices will be moved past their end. To fix this, the code now first splits all spans that end before the end of the in-progress span (A) (in this case B and C) into subslices. This is identical to the previous behaviour except that the subslicing stops as soon as the first span whose end starts before the end of the in-progress span (A) is encountered. Afterwards the span list is resorted (unchanged) to ensure the new subslices are at the correct posistion. Finally the spans that are shorter than the in-progress span (A) are processed normally (no subslicing).
- Loading branch information
1 parent
276e58b
commit f73a14e
Showing
2 changed files
with
138 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters