Remove unused variables in structs
This commit is contained in:
@@ -80,7 +80,6 @@ ol.structs.IntegerSet.prototype.compactRanges_ = function() {
|
|||||||
var arr = this.arr_;
|
var arr = this.arr_;
|
||||||
var n = arr.length;
|
var n = arr.length;
|
||||||
var rangeIndex = 0;
|
var rangeIndex = 0;
|
||||||
var lastRange = null;
|
|
||||||
var i;
|
var i;
|
||||||
for (i = 0; i < n; i += 2) {
|
for (i = 0; i < n; i += 2) {
|
||||||
if (arr[i] == arr[i + 1]) {
|
if (arr[i] == arr[i + 1]) {
|
||||||
|
|||||||
@@ -26,12 +26,14 @@ describe('ol.structs.IntegerSet', function() {
|
|||||||
it('throws an exception with an odd number of elements', function() {
|
it('throws an exception with an odd number of elements', function() {
|
||||||
expect(function() {
|
expect(function() {
|
||||||
var is = new ol.structs.IntegerSet([0, 2, 4]);
|
var is = new ol.structs.IntegerSet([0, 2, 4]);
|
||||||
|
is = is; // suppress gjslint warning about unused variable
|
||||||
}).to.throwException();
|
}).to.throwException();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('throws an exception with out-of-order elements', function() {
|
it('throws an exception with out-of-order elements', function() {
|
||||||
expect(function() {
|
expect(function() {
|
||||||
var is = new ol.structs.IntegerSet([0, 2, 2, 4]);
|
var is = new ol.structs.IntegerSet([0, 2, 2, 4]);
|
||||||
|
is = is; // suppress gjslint warning about unused variable
|
||||||
}).to.throwException();
|
}).to.throwException();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ describe('ol.structs.PriorityQueue', function() {
|
|||||||
pq = new ol.structs.PriorityQueue(function(element) {
|
pq = new ol.structs.PriorityQueue(function(element) {
|
||||||
return Math.abs(element - target);
|
return Math.abs(element - target);
|
||||||
}, goog.identityFunction);
|
}, goog.identityFunction);
|
||||||
var element, i;
|
var i;
|
||||||
for (i = 0; i < 32; ++i) {
|
for (i = 0; i < 32; ++i) {
|
||||||
pq.enqueue(Math.random());
|
pq.enqueue(Math.random());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user