Fix transport reader
This commit is contained in:
parent
bc25f22ca2
commit
cf67a55b36
2 changed files with 5 additions and 5 deletions
|
@ -2660,8 +2660,10 @@ public class BinaryMapIndexReader {
|
||||||
incompleteTransportRoutes = new TLongObjectHashMap<>();
|
incompleteTransportRoutes = new TLongObjectHashMap<>();
|
||||||
for (TransportIndex ti : transportIndexes) {
|
for (TransportIndex ti : transportIndexes) {
|
||||||
if (ti.incompleteRoutesLength > 0) {
|
if (ti.incompleteRoutesLength > 0) {
|
||||||
transportAdapter.readIncompleteRoutesList(incompleteTransportRoutes, ti.incompleteRoutesLength,
|
codedIS.seek(ti.incompleteRoutesOffset);
|
||||||
ti.incompleteRoutesOffset);
|
int oldLimit = codedIS.pushLimit(ti.incompleteRoutesLength);
|
||||||
|
transportAdapter.readIncompleteRoutesList(incompleteTransportRoutes);
|
||||||
|
codedIS.popLimit(oldLimit);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -251,9 +251,7 @@ public class BinaryMapTransportReaderAdapter {
|
||||||
return ((char) i)+"";
|
return ((char) i)+"";
|
||||||
}
|
}
|
||||||
|
|
||||||
public void readIncompleteRoutesList(TLongObjectHashMap<net.osmand.data.IncompleteTransportRoute> incompleteRoutes,
|
public void readIncompleteRoutesList(TLongObjectHashMap<net.osmand.data.IncompleteTransportRoute> incompleteRoutes) throws IOException {
|
||||||
int length, int offset) throws IOException {
|
|
||||||
codedIS.seek(offset);
|
|
||||||
boolean end = false;
|
boolean end = false;
|
||||||
while (!end) {
|
while (!end) {
|
||||||
int t = codedIS.readTag();
|
int t = codedIS.readTag();
|
||||||
|
|
Loading…
Reference in a new issue