SplitPathCoord: Ensure monotony and bounds for at#2331
Open
dg0yt wants to merge 4 commits intoOpenOrienteering:masterfrom
Open
SplitPathCoord: Ensure monotony and bounds for at#2331dg0yt wants to merge 4 commits intoOpenOrienteering:masterfrom
at#2331dg0yt wants to merge 4 commits intoOpenOrienteering:masterfrom
Conversation
dg0yt
commented
Feb 2, 2025
Comment on lines
-391
to
+394
| split.path_coord_index = path_coords.upperBound(length, first.path_coord_index, first.path_coords->size()-1); | ||
| if (length > first.clen) | ||
| { | ||
| split.path_coord_index = path_coords.upperBound(length, first.path_coord_index, first.path_coords->size()-1); | ||
| } |
Comment on lines
408
to
+414
| if (qFuzzyCompare(1.0f + length, 1.0f + current_coord.clen) || | ||
| qFuzzyCompare(1.0f + curve_length, 1.0f)) | ||
| qFuzzyCompare(1.0f + curve_length, 1.0f) || | ||
| length > current_coord.clen) | ||
| { | ||
| // Close match at current path coordinate, | ||
| // or near-zero curve length. | ||
| // or near-zero curve length, | ||
| // or length exceeding path length. |
Comment on lines
+514
to
-511
|
|
||
| split.index = path_coords[split.path_coord_index].index; | ||
| } | ||
|
|
||
| split.index = path_coords[split.path_coord_index].index; |
Member
Author
There was a problem hiding this comment.
Drive-by change. When not entering the if branch, the right split.index is implied by initialization of split.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For #2325. Test first.
Unlike #2325, this touches the behavior of a core function. While the change is reasonable IMHO, this may need more testing. Other parts of Mapper might implicitly rely on the broken cases.