Skip to content

Commit

Permalink
coding standards: replace 'new Array()' with '[]'
Browse files Browse the repository at this point in the history
  • Loading branch information
fredj committed Feb 1, 2012
1 parent 271e3b6 commit 56d22ff
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/OpenLayers/Format/CSWGetRecords/v2_0_2.js
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ OpenLayers.Format.CSWGetRecords.v2_0_2 = OpenLayers.Class(OpenLayers.Format.XML,
"*": function(node, obj) {
var name = node.localName || node.nodeName.split(":").pop();
if (!(OpenLayers.Util.isArray(obj[name]))) {
obj[name] = new Array();
obj[name] = [];
}
var dc_element = {};
var attrs = node.attributes;
Expand All @@ -273,7 +273,7 @@ OpenLayers.Format.CSWGetRecords.v2_0_2 = OpenLayers.Class(OpenLayers.Format.XML,
"*": function(node, obj) {
var name = node.localName || node.nodeName.split(":").pop();
if (!(OpenLayers.Util.isArray(obj[name]))) {
obj[name] = new Array();
obj[name] = [];
}
obj[name].push(this.getChildValue(node));
}
Expand Down
2 changes: 1 addition & 1 deletion lib/OpenLayers/Layer/FixedZoomLevels.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ OpenLayers.Layer.FixedZoomLevels = OpenLayers.Class({
*/
initResolutions: function() {

var props = new Array('minZoomLevel', 'maxZoomLevel', 'numZoomLevels');
var props = ['minZoomLevel', 'maxZoomLevel', 'numZoomLevels'];

for(var i=0, len=props.length; i<len; i++) {
var property = props[i];
Expand Down
2 changes: 1 addition & 1 deletion lib/OpenLayers/Layer/Text.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ OpenLayers.Layer.Text = OpenLayers.Class(OpenLayers.Layer.Markers, {
*/
initialize: function(name, options) {
OpenLayers.Layer.Markers.prototype.initialize.apply(this, arguments);
this.features = new Array();
this.features = [];
},

/**
Expand Down

0 comments on commit 56d22ff

Please sign in to comment.