Merge branch 'r3.3'

This commit is contained in:
Victor Shcherb 2019-03-15 13:31:18 +01:00
commit 07f4898f59
2 changed files with 19 additions and 17 deletions

View file

@ -43,7 +43,10 @@ public class TransportRoute extends MapObject {
}
public List<Way> getForwardWays() {
return forwardWays == null ? Collections.emptyList() : forwardWays;
if(forwardWays == null) {
return Collections.emptyList();
}
return forwardWays;
}

View file

@ -1,16 +1,9 @@
package net.osmand.router;
import net.osmand.Location;
import net.osmand.binary.BinaryMapIndexReader;
import net.osmand.binary.BinaryMapIndexReader.SearchRequest;
import net.osmand.data.LatLon;
import net.osmand.data.QuadRect;
import net.osmand.data.TransportRoute;
import net.osmand.data.TransportSchedule;
import net.osmand.data.TransportStop;
import net.osmand.osm.edit.Node;
import net.osmand.osm.edit.Way;
import net.osmand.util.MapUtils;
import gnu.trove.iterator.TIntIterator;
import gnu.trove.list.array.TIntArrayList;
import gnu.trove.map.hash.TIntObjectHashMap;
import gnu.trove.map.hash.TLongObjectHashMap;
import java.io.IOException;
import java.util.ArrayList;
@ -21,10 +14,16 @@ import java.util.List;
import java.util.Map;
import java.util.PriorityQueue;
import gnu.trove.iterator.TIntIterator;
import gnu.trove.list.array.TIntArrayList;
import gnu.trove.map.hash.TIntObjectHashMap;
import gnu.trove.map.hash.TLongObjectHashMap;
import net.osmand.binary.BinaryMapIndexReader;
import net.osmand.binary.BinaryMapIndexReader.SearchRequest;
import net.osmand.data.LatLon;
import net.osmand.data.QuadRect;
import net.osmand.data.TransportRoute;
import net.osmand.data.TransportSchedule;
import net.osmand.data.TransportStop;
import net.osmand.osm.edit.Node;
import net.osmand.osm.edit.Way;
import net.osmand.util.MapUtils;
public class TransportRoutePlanner {
@ -96,7 +95,7 @@ public class TransportRoutePlanner {
} else {
travelTime += ctx.cfg.stopTime + segmentDist / ctx.cfg.travelSpeed;
}
if(travelDist > finishTime + ctx.cfg.finishTimeSeconds) {
if(travelTime > finishTime + ctx.cfg.finishTimeSeconds) {
break;
}
sgms.clear();