Fix java/C++ rendering rules property - should match types
This commit is contained in:
parent
0bc9008b9f
commit
684f2b95d7
1 changed files with 7 additions and 7 deletions
|
@ -41,7 +41,7 @@ public class RenderingRule {
|
|||
public void init(Map<String, String> attributes) {
|
||||
ArrayList<RenderingRuleProperty> props = new ArrayList<RenderingRuleProperty>(attributes.size());
|
||||
intProperties = new int[attributes.size()];
|
||||
floatProperties = null;
|
||||
floatProperties = new float[attributes.size()];
|
||||
attributesRef = null;
|
||||
int i = 0;
|
||||
Iterator<Entry<String, String>> 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;
|
||||
|
|
Loading…
Reference in a new issue