@@ -935,10 +935,10 @@ public Weighting createWeighting(HintsMap hintsMap, FlagEncoder encoder, Graph g
935
935
/**
936
936
* Potentially wraps the specified weighting into a TurnWeighting instance.
937
937
*/
938
- public Weighting createTurnWeighting (Weighting weighting , TurnCostExtension turnCostExtension , TraversalMode tMode , double uTurnCosts ) {
938
+ public Weighting createTurnWeighting (Graph graph , Weighting weighting , TraversalMode tMode , double uTurnCosts ) {
939
939
FlagEncoder encoder = weighting .getFlagEncoder ();
940
940
if (encoder .supports (TurnWeighting .class ) && tMode .isEdgeBased ())
941
- return new TurnWeighting (weighting , turnCostExtension , uTurnCosts );
941
+ return new TurnWeighting (weighting , ( TurnCostExtension ) graph . getExtension () , uTurnCosts );
942
942
return weighting ;
943
943
}
944
944
@@ -1062,7 +1062,7 @@ else if (ALT_ROUTE.equalsIgnoreCase(algoStr))
1062
1062
throw new IllegalArgumentException ("Finite u-turn costs can only be used for edge-based routing, use `" + Routing .EDGE_BASED + "=true'" );
1063
1063
}
1064
1064
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 );
1066
1066
1067
1067
AlgorithmOptions algoOpts = AlgorithmOptions .start ().
1068
1068
algorithm (algoStr ).traversalMode (tMode ).weighting (weighting ).
0 commit comments