added missing semicolons; while at it also introduced some array length caching and simplified var assignments. Non-functional change. Thanks rot for spotting this. (closes #2019)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@9147 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
ahocevar
2009-03-31 16:39:28 +00:00
parent 61b5293692
commit 0c1fe31b0a
2 changed files with 8 additions and 10 deletions

View File

@@ -52,7 +52,7 @@ OpenLayers.Format.WFSDescribeFeatureType = OpenLayers.Class(
var attributes = node.attributes;
var attr, name;
for(var i=0; i<attributes.length; ++i) {
for(var i=0, len=attributes.length; i<len; ++i) {
attr = attributes[i];
name = attr.name;
if(name.indexOf("xmlns") == 0) {
@@ -66,7 +66,7 @@ OpenLayers.Format.WFSDescribeFeatureType = OpenLayers.Class(
// map complexTypes to names of customTypes
var complexType, customType;
for(var i=0; i<complexTypes.length; ++i) {
for(var i=0, len=complexTypes.length; i<len; ++i) {
complexType = complexTypes[i];
customType = customTypes[complexType.typeName];
if(customTypes[complexType.typeName]) {
@@ -80,7 +80,7 @@ OpenLayers.Format.WFSDescribeFeatureType = OpenLayers.Class(
// the schema reader with the metadata found in the
// customTypes hash
"typeName": node.getAttribute("name")
}
};
this.readChildNodes(node, complexType);
obj.complexTypes.push(complexType);
},
@@ -102,7 +102,7 @@ OpenLayers.Format.WFSDescribeFeatureType = OpenLayers.Class(
var element = {};
var attributes = node.attributes;
var attr;
for(var i=0; i<attributes.length; ++i) {
for(var i=0, len=attributes.length; i<len; ++i) {
attr = attributes[i];
element[attr.name] = attr.value;
}
@@ -110,7 +110,7 @@ OpenLayers.Format.WFSDescribeFeatureType = OpenLayers.Class(
var type = element.type;
if(!type) {
type = {};
this.readChildNodes(node, type)
this.readChildNodes(node, type);
element.restriction = type;
element.type = type.base;
}
@@ -149,7 +149,7 @@ OpenLayers.Format.WFSDescribeFeatureType = OpenLayers.Class(
readRestriction: function(node, obj) {
var children = node.childNodes;
var child, nodeName, value;
for(var i=0; i<children.length; ++i) {
for(var i=0, len=children.length; i<len; ++i) {
child = children[i];
if(child.nodeType == 1) {
nodeName = child.nodeName.split(":").pop();

View File

@@ -95,12 +95,10 @@ OpenLayers.Format.WMSGetFeatureInfo = OpenLayers.Class(OpenLayers.Format.XML, {
*/
read_msGMLOutput: function(data) {
var response = [];
var layerNodes, n;
layerNodes = this.getSiblingNodesByTagCriteria(data,
var layerNodes = this.getSiblingNodesByTagCriteria(data,
this.layerIdentifier);
if (layerNodes) {
n = layerNodes.length;
for (var i = 0; i < n; i++) {
for (var i=0, len=layerNodes.length; i<len; ++i) {
var node = layerNodes[i];
var layerName = node.nodeName;
if (node.prefix) {