From 684f2b95d7a513e8c5efd908e15be11f862099d4 Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Sun, 18 Oct 2020 11:55:23 +0200 Subject: [PATCH] Fix java/C++ rendering rules property - should match types --- .../main/java/net/osmand/render/RenderingRule.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/OsmAnd-java/src/main/java/net/osmand/render/RenderingRule.java b/OsmAnd-java/src/main/java/net/osmand/render/RenderingRule.java index 88a7fc83dc..0ae4314dd9 100644 --- a/OsmAnd-java/src/main/java/net/osmand/render/RenderingRule.java +++ b/OsmAnd-java/src/main/java/net/osmand/render/RenderingRule.java @@ -41,7 +41,7 @@ public class RenderingRule { public void init(Map attributes) { ArrayList props = new ArrayList(attributes.size()); intProperties = new int[attributes.size()]; - floatProperties = null; + floatProperties = new float[attributes.size()]; attributesRef = null; int i = 0; Iterator> it = attributes.entrySet().iterator(); @@ -60,11 +60,11 @@ public class RenderingRule { intProperties[i] = storage.getDictionaryValue(vl); } else { float floatVal = property.parseFloatValue(vl); - if (floatProperties == null && floatVal != 0) { - // lazy creates - floatProperties = new float[attributes.size()]; - floatProperties[i] = property.parseFloatValue(vl); - } +// if (floatProperties == null && floatVal != 0) { +// // lazy creates +// floatProperties = new float[attributes.size()]; + floatProperties[i] = floatVal; +// } intProperties[i] = property.parseIntValue(vl); } i++; @@ -94,7 +94,7 @@ public class RenderingRule { public float getFloatPropertyValue(String property) { int i = getPropertyIndex(property); - if(i >= 0 && floatProperties != null){ + if (i >= 0) { return floatProperties[i]; } return 0;