From c95586879f2ab7ee871db854c96561765237d191 Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Wed, 13 Apr 2016 23:00:27 +0200 Subject: [PATCH] Fix tests --- .../osmand/router/RouteResultPreparation.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/OsmAnd-java/src/net/osmand/router/RouteResultPreparation.java b/OsmAnd-java/src/net/osmand/router/RouteResultPreparation.java index ccad27cb76..dc7279d4ed 100644 --- a/OsmAnd-java/src/net/osmand/router/RouteResultPreparation.java +++ b/OsmAnd-java/src/net/osmand/router/RouteResultPreparation.java @@ -871,16 +871,16 @@ public class RouteResultPreparation { double ex = MapUtils.degreesDiff(attached.getBearingBegin(), currentSegm.getBearingBegin()); double mpi = Math.abs(MapUtils.degreesDiff(prevSegm.getBearingEnd(), attached.getBearingBegin())); int rsSpeakPriority = highwaySpeakPriority(attached.getObject().getHighway()); + int lanes = countLanesMinOne(attached); + boolean smallStraightVariation = mpi < TURN_DEGREE_MIN; + boolean smallTargetVariation = Math.abs(ex) < TURN_DEGREE_MIN; + boolean attachedOnTheRight = ex >= 0; + if (attachedOnTheRight) { + rs.roadsOnRight++; + } else { + rs.roadsOnLeft++; + } if (rsSpeakPriority != MAX_SPEAK_PRIORITY || speakPriority == MAX_SPEAK_PRIORITY) { - int lanes = countLanesMinOne(attached); - boolean smallStraightVariation = mpi < TURN_DEGREE_MIN; - boolean smallTargetVariation = Math.abs(ex) < TURN_DEGREE_MIN; - boolean attachedOnTheRight = ex >= 0; - if (attachedOnTheRight) { - rs.roadsOnRight++; - } else { - rs.roadsOnLeft++; - } if (smallTargetVariation || smallStraightVariation) { if (attachedOnTheRight) { rs.keepLeft = true;