From 3ef0a4f9a80439ec2964e47ff9b13999f8a86390 Mon Sep 17 00:00:00 2001 From: Saikrishna Arcot Date: Mon, 6 Oct 2014 12:43:50 -0400 Subject: [PATCH] Change return type of attachTurnLanesData to void --- .../net/osmand/router/RouteResultPreparation.java | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/OsmAnd-java/src/net/osmand/router/RouteResultPreparation.java b/OsmAnd-java/src/net/osmand/router/RouteResultPreparation.java index c53965257c..52a01bc0e1 100644 --- a/OsmAnd-java/src/net/osmand/router/RouteResultPreparation.java +++ b/OsmAnd-java/src/net/osmand/router/RouteResultPreparation.java @@ -578,7 +578,7 @@ public class RouteResultPreparation { if (t != null && lanes != null) { t.setLanes(lanes); - t = attachTurnLanesData(leftSide, prevSegm, t); + attachTurnLanesData(leftSide, prevSegm, t); } return t; } @@ -608,29 +608,27 @@ public class RouteResultPreparation { } } - private TurnType attachTurnLanesData(boolean leftSide, RouteSegmentResult prevSegm, TurnType t) { + private void attachTurnLanesData(boolean leftSide, RouteSegmentResult prevSegm, TurnType t) { int lanes = prevSegm.getObject().getLanes(); String turnLanes = getTurnLanesString(prevSegm); if (turnLanes == null) { - return t; + return; } String[] splitLaneOptions = turnLanes.split("\\|", -1); if (splitLaneOptions.length != lanes) { // Error in data or missing data - return t; + return; } if (t.getLanes().length != lanes) { // The turn:lanes don't easily match up to the target road. // TODO: Add support for lanes that can go in multiple directions - return t; + return; } assignTurns(splitLaneOptions, t); - - return t; } private void assignTurns(String[] splitLaneOptions, TurnType t) {