From d527eb4fe9efd67c962c727259d458d04affd754 Mon Sep 17 00:00:00 2001 From: Saikrishna Arcot Date: Thu, 4 Dec 2014 22:51:18 -0500 Subject: [PATCH] Fix slight turn definition, and remove redundant lines --- OsmAnd-java/src/net/osmand/router/RouteResultPreparation.java | 3 --- OsmAnd-java/src/net/osmand/router/TurnType.java | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/OsmAnd-java/src/net/osmand/router/RouteResultPreparation.java b/OsmAnd-java/src/net/osmand/router/RouteResultPreparation.java index 83fb8c3fc5..6fcefc641b 100644 --- a/OsmAnd-java/src/net/osmand/router/RouteResultPreparation.java +++ b/OsmAnd-java/src/net/osmand/router/RouteResultPreparation.java @@ -703,9 +703,6 @@ public class RouteResultPreparation { // When going straight, the lanes have to be calculated from the previous segment, not the current/next segment. int prevLanes = countLanesMinOne(prevSegm); - if (prevLanes <= 0) { - prevLanes = 1; - } t.setLanes(attachTurnLanesData(prevSegm, new int[prevLanes])); diff --git a/OsmAnd-java/src/net/osmand/router/TurnType.java b/OsmAnd-java/src/net/osmand/router/TurnType.java index 04f982045e..8884c64ede 100644 --- a/OsmAnd-java/src/net/osmand/router/TurnType.java +++ b/OsmAnd-java/src/net/osmand/router/TurnType.java @@ -255,6 +255,6 @@ public class TurnType { } public static boolean isSlightTurn(int type) { - return !isLeftTurn(type) && !isRightTurn(type) && type != TU && type != TRU && type != OFFR; + return type == TSLL || type == TSLR || type == C || type == KL || type == KR; } }