Skip to content

Commit

Permalink
refactor(StatesToWalkStepMapper): Reuse hasProfileCost check.
Browse files Browse the repository at this point in the history
  • Loading branch information
binh-dam-ibigroup committed Aug 15, 2024
1 parent 5ad796d commit d6ce9c5
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -200,10 +200,7 @@ private void processState(State backState, State forwardState) {

// G-MAP-specific: Overwrite the name on short street edges so they are merged with longer street
// sections to clean up turn-by-turn instructions.
if (
edge instanceof StreetEdge streetEdge &&
streetEdge.profileCost != null && !streetEdge.profileCost.isEmpty()
) {
if (edge instanceof StreetEdge streetEdge && streetEdge.hasProfileCost()) {
if (shouldOverwriteCurrentDirectionText(edge, direction)) {
// HACK: If the instruction is "continue", the current street name is bogus and its length is very short (< 10 meters)
// but not the next edge one, use the next street name and don't start a new step.
Expand Down

0 comments on commit d6ce9c5

Please sign in to comment.