Revert "protect for in loops with hasOwnProperty"

This reverts commit e3cc96dbfb.
This commit is contained in:
Éric Lemoine
2012-03-03 22:35:39 +01:00
parent 161b54b6f1
commit 9a116b21b9
31 changed files with 267 additions and 386 deletions

View File

@@ -541,11 +541,9 @@ OpenLayers.Format.SLD.v1 = OpenLayers.Class(OpenLayers.Format.Filter.v1_0_0, {
getCssProperty: function(sym) {
var css = null;
for(var prop in this.cssMap) {
if (this.cssMap.hasOwnProperty(prop)) {
if(this.cssMap[prop] == sym) {
css = prop;
break;
}
if(this.cssMap[prop] == sym) {
css = prop;
break;
}
}
return css;
@@ -567,14 +565,12 @@ OpenLayers.Format.SLD.v1 = OpenLayers.Class(OpenLayers.Format.Filter.v1_0_0, {
getGraphicFormat: function(href) {
var format, regex;
for(var key in this.graphicFormats) {
if (this.graphicFormats.hasOwnProperty(key)) {
if(this.graphicFormats[key].test(href)) {
format = key;
break;
}
if(this.graphicFormats[key].test(href)) {
format = key;
break;
}
}
return format || this.defaultGraphicFormat;
return format || this.defautlGraphicFormat;
},
/**
@@ -680,9 +676,7 @@ OpenLayers.Format.SLD.v1 = OpenLayers.Class(OpenLayers.Format.Filter.v1_0_0, {
}
} else {
for(var name in sld.namedLayers) {
if (sld.namedLayers.hasOwnProperty(name)) {
this.writeNode("NamedLayer", sld.namedLayers[name], root);
}
this.writeNode("NamedLayer", sld.namedLayers[name], root);
}
}
return root;
@@ -775,13 +769,11 @@ OpenLayers.Format.SLD.v1 = OpenLayers.Class(OpenLayers.Format.Filter.v1_0_0, {
ruleMap[zIndex].symbolizers.push(symbolizer.clone());
}
for (zIndex in ruleMap) {
if (ruleMap.hasOwnProperty(zIndex)) {
if (!(zIndex in rulesByZ)) {
zValues.push(zIndex);
rulesByZ[zIndex] = [];
}
rulesByZ[zIndex].push(ruleMap[zIndex]);
if (!(zIndex in rulesByZ)) {
zValues.push(zIndex);
rulesByZ[zIndex] = [];
}
rulesByZ[zIndex].push(ruleMap[zIndex]);
}
} else {
// no symbolizers in rule