Inline simple goog.isDef() calls
This commit is contained in:
@@ -17,7 +17,7 @@ ol.geom.flat.flip.flipXY =
|
||||
var dest, destOffset;
|
||||
if (opt_dest !== undefined) {
|
||||
dest = opt_dest;
|
||||
destOffset = goog.isDef(opt_destOffset) ? opt_destOffset : 0;
|
||||
destOffset = opt_destOffset !== undefined ? opt_destOffset : 0;
|
||||
} else {
|
||||
goog.asserts.assert(opt_destOffset === undefined,
|
||||
'opt_destOffSet should be defined');
|
||||
|
||||
@@ -11,7 +11,7 @@ goog.provide('ol.geom.flat.inflate');
|
||||
*/
|
||||
ol.geom.flat.inflate.coordinates =
|
||||
function(flatCoordinates, offset, end, stride, opt_coordinates) {
|
||||
var coordinates = goog.isDef(opt_coordinates) ? opt_coordinates : [];
|
||||
var coordinates = opt_coordinates !== undefined ? opt_coordinates : [];
|
||||
var i = 0;
|
||||
var j;
|
||||
for (j = offset; j < end; j += stride) {
|
||||
@@ -32,7 +32,7 @@ ol.geom.flat.inflate.coordinates =
|
||||
*/
|
||||
ol.geom.flat.inflate.coordinatess =
|
||||
function(flatCoordinates, offset, ends, stride, opt_coordinatess) {
|
||||
var coordinatess = goog.isDef(opt_coordinatess) ? opt_coordinatess : [];
|
||||
var coordinatess = opt_coordinatess !== undefined ? opt_coordinatess : [];
|
||||
var i = 0;
|
||||
var j, jj;
|
||||
for (j = 0, jj = ends.length; j < jj; ++j) {
|
||||
@@ -57,7 +57,7 @@ ol.geom.flat.inflate.coordinatess =
|
||||
*/
|
||||
ol.geom.flat.inflate.coordinatesss =
|
||||
function(flatCoordinates, offset, endss, stride, opt_coordinatesss) {
|
||||
var coordinatesss = goog.isDef(opt_coordinatesss) ? opt_coordinatesss : [];
|
||||
var coordinatesss = opt_coordinatesss !== undefined ? opt_coordinatesss : [];
|
||||
var i = 0;
|
||||
var j, jj;
|
||||
for (j = 0, jj = endss.length; j < jj; ++j) {
|
||||
|
||||
@@ -42,7 +42,7 @@ goog.require('ol.math');
|
||||
*/
|
||||
ol.geom.flat.simplify.lineString = function(flatCoordinates, offset, end,
|
||||
stride, squaredTolerance, highQuality, opt_simplifiedFlatCoordinates) {
|
||||
var simplifiedFlatCoordinates = goog.isDef(opt_simplifiedFlatCoordinates) ?
|
||||
var simplifiedFlatCoordinates = opt_simplifiedFlatCoordinates !== undefined ?
|
||||
opt_simplifiedFlatCoordinates : [];
|
||||
if (!highQuality) {
|
||||
end = ol.geom.flat.simplify.radialDistance(flatCoordinates, offset, end,
|
||||
|
||||
Reference in New Issue
Block a user