Caching array length instead of accessing it with each iteration. r=crschmidt (closes #1636)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@7627 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -79,7 +79,7 @@ OpenLayers.Control.Permalink = OpenLayers.Class(OpenLayers.Control, {
|
||||
OpenLayers.Control.prototype.setMap.apply(this, arguments);
|
||||
|
||||
//make sure we have an arg parser attached
|
||||
for(var i=0; i< this.map.controls.length; i++) {
|
||||
for(var i=0, len=this.map.controls.length; i<len; i++) {
|
||||
var control = this.map.controls[i];
|
||||
if (control.CLASS_NAME == "OpenLayers.Control.ArgParser") {
|
||||
|
||||
@@ -153,7 +153,7 @@ OpenLayers.Control.Permalink = OpenLayers.Class(OpenLayers.Control, {
|
||||
params.lon = Math.round(lon*100000)/100000;
|
||||
|
||||
params.layers = '';
|
||||
for (var i=0; i < this.map.layers.length; i++) {
|
||||
for (var i=0, len=this.map.layers.length; i<len; i++) {
|
||||
var layer = this.map.layers[i];
|
||||
|
||||
if (layer.isBaseLayer) {
|
||||
|
||||
Reference in New Issue
Block a user