Merge remote-tracking branch 'origin/master'

This commit is contained in:
Weblate 2017-08-23 17:21:24 +02:00
commit 21cc74a3e1

View file

@ -11,6 +11,7 @@ import java.util.TreeSet;
import net.osmand.binary.BinaryMapIndexReader.MapIndex; import net.osmand.binary.BinaryMapIndexReader.MapIndex;
import net.osmand.binary.BinaryMapIndexReader.TagValuePair; import net.osmand.binary.BinaryMapIndexReader.TagValuePair;
import net.osmand.render.RenderingRulesStorage; import net.osmand.render.RenderingRulesStorage;
import net.osmand.util.Algorithms;
public class BinaryMapDataObject { public class BinaryMapDataObject {
protected int[] coordinates = null; protected int[] coordinates = null;
@ -249,13 +250,11 @@ public class BinaryMapDataObject {
} else if(objectNames.size() != thatObj.objectNames.size()){ } else if(objectNames.size() != thatObj.objectNames.size()){
equals = false; equals = false;
} else { } else {
Object[] thisNames = objectNames.values(); for(int i = 0; i < namesOrder.size() && equals; i++) {
Object[] thatNames = thatObj.objectNames.values(); String o = objectNames.get(namesOrder.get(i));
String[] thisStrings = Arrays.copyOf(thisNames, thisNames.length, String[].class); String s = thatObj.objectNames.get(thatObj.namesOrder.get(i));
String[] thatStrings = Arrays.copyOf(thatNames, thatNames.length, String[].class); equals = Algorithms.objectEquals(o, s);
TreeSet<String> st = new TreeSet<String>(Arrays.asList(thisStrings)); }
TreeSet<String> ot = new TreeSet<String>(Arrays.asList(thatStrings));
equals = st.equals(ot);
} }
} }