Use blocked scoped variables
In addition to using const and let, this also upgrades our linter config and removes lint (mostly whitespace).
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @module ol/geom/flat/reverse
|
||||
*/
|
||||
var _ol_geom_flat_reverse_ = {};
|
||||
const _ol_geom_flat_reverse_ = {};
|
||||
|
||||
|
||||
/**
|
||||
@@ -12,9 +12,8 @@ var _ol_geom_flat_reverse_ = {};
|
||||
*/
|
||||
_ol_geom_flat_reverse_.coordinates = function(flatCoordinates, offset, end, stride) {
|
||||
while (offset < end - stride) {
|
||||
var i;
|
||||
for (i = 0; i < stride; ++i) {
|
||||
var tmp = flatCoordinates[offset + i];
|
||||
for (let i = 0; i < stride; ++i) {
|
||||
const tmp = flatCoordinates[offset + i];
|
||||
flatCoordinates[offset + i] = flatCoordinates[end - stride + i];
|
||||
flatCoordinates[end - stride + i] = tmp;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user