Refactoring

This commit is contained in:
Roman Inflianskas 2016-05-25 11:22:53 +03:00
parent cde96e5848
commit 61bfbdc3ed

View file

@ -152,7 +152,6 @@ public class BinaryMapPoiReaderAdapter {
}
}
protected void readPoiIndex(PoiRegion region, boolean readCategories) throws IOException {
int length;
int oldLimit;
@ -370,7 +369,8 @@ public class BinaryMapPoiReaderAdapter {
offset = codedIS.getTotalBytesRead();
map.readIndexedStringTable(instance, query, "", dataOffsets, 0);
codedIS.popLimit(oldLimit);
break; }
break;
}
case OsmandOdb.OsmAndPoiNameIndex.DATA_FIELD_NUMBER: {
if (dataOffsets != null) {
dataOffsets.sort(); // 1104125
@ -387,7 +387,8 @@ public class BinaryMapPoiReaderAdapter {
}
}
codedIS.skipRawBytes(codedIS.getBytesUntilLimit());
return offsets; }
return offsets;
}
default:
skipUnknownField(t);
break;
@ -414,7 +415,6 @@ public class BinaryMapPoiReaderAdapter {
break;
}
}
}
private void readPoiNameIndexDataAtom(TIntLongHashMap offsets, SearchRequest<Amenity> req) throws IOException {
@ -659,6 +659,7 @@ public class BinaryMapPoiReaderAdapter {
}
return arp;
}
private Amenity readPoiPoint(int left31, int right31, int top31, int bottom31,
int px, int py, int zoom, SearchRequest<Amenity> req, PoiRegion region, boolean checkBounds) throws IOException {
Amenity am = null;
@ -753,7 +754,6 @@ public class BinaryMapPoiReaderAdapter {
am.setSubType(am.getSubType() + ";" + subtype);
}
}
break;
case OsmandOdb.OsmAndPoiBoxDataAtom.ID_FIELD_NUMBER:
am.setId(codedIS.readUInt64());
@ -819,7 +819,6 @@ public class BinaryMapPoiReaderAdapter {
codedIS.skipRawBytes(codedIS.getBytesUntilLimit());
return true;
}
break;
default:
skipUnknownField(t);
@ -871,7 +870,6 @@ public class BinaryMapPoiReaderAdapter {
existsCategories = true;
}
break;
case OsmandOdb.OsmAndPoiBox.SUBBOXES_FIELD_NUMBER: {
int x = dx + (px << (zoom - pzoom));
int y = dy + (py << (zoom - pzoom));
@ -901,7 +899,8 @@ public class BinaryMapPoiReaderAdapter {
return true;
}
}
} break;
}
break;
case OsmandOdb.OsmAndPoiBox.SHIFTTODATA_FIELD_NUMBER: {
int x = dx + (px << (zoom - pzoom));
int y = dy + (py << (zoom - pzoom));
@ -922,7 +921,8 @@ public class BinaryMapPoiReaderAdapter {
offsetsMap.put(offset, -1);
}
}
} break;
}
break;
default:
skipUnknownField(t);
break;