Skip to content

Commit 643ddbc

Browse files
committed
Revert "Adjust signature of GraphHopper#createTurnWeighting"
This reverts commit cf309c4
1 parent cf309c4 commit 643ddbc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

core/src/main/java/com/graphhopper/GraphHopper.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -935,10 +935,10 @@ public Weighting createWeighting(HintsMap hintsMap, FlagEncoder encoder, Graph g
935935
/**
936936
* Potentially wraps the specified weighting into a TurnWeighting instance.
937937
*/
938-
public Weighting createTurnWeighting(Weighting weighting, TurnCostExtension turnCostExtension, TraversalMode tMode, double uTurnCosts) {
938+
public Weighting createTurnWeighting(Graph graph, Weighting weighting, TraversalMode tMode, double uTurnCosts) {
939939
FlagEncoder encoder = weighting.getFlagEncoder();
940940
if (encoder.supports(TurnWeighting.class) && tMode.isEdgeBased())
941-
return new TurnWeighting(weighting, turnCostExtension, uTurnCosts);
941+
return new TurnWeighting(weighting, (TurnCostExtension) graph.getExtension(), uTurnCosts);
942942
return weighting;
943943
}
944944

@@ -1062,7 +1062,7 @@ else if (ALT_ROUTE.equalsIgnoreCase(algoStr))
10621062
throw new IllegalArgumentException("Finite u-turn costs can only be used for edge-based routing, use `" + Routing.EDGE_BASED + "=true'");
10631063
}
10641064
double uTurnCosts = uTurnCostInt == INFINITE_U_TURN_COSTS ? Double.POSITIVE_INFINITY : uTurnCostInt;
1065-
weighting = createTurnWeighting(weighting, (TurnCostExtension) queryGraph.getExtension(), tMode, uTurnCosts);
1065+
weighting = createTurnWeighting(queryGraph, weighting, tMode, uTurnCosts);
10661066

10671067
AlgorithmOptions algoOpts = AlgorithmOptions.start().
10681068
algorithm(algoStr).traversalMode(tMode).weighting(weighting).

0 commit comments

Comments
 (0)