Inline simple !goog.isDef() checks

This commit is contained in:
Tim Schaub
2015-09-27 10:23:30 -06:00
parent b36d697585
commit 6638ae855d
14 changed files with 27 additions and 27 deletions
+3 -3
View File
@@ -21,7 +21,7 @@ ol.Size;
* @return {ol.Size}
*/
ol.size.buffer = function(size, buffer, opt_size) {
if (!goog.isDef(opt_size)) {
if (opt_size === undefined) {
opt_size = [0, 0];
}
opt_size[0] = size[0] + 2 * buffer;
@@ -59,7 +59,7 @@ ol.size.hasArea = function(size) {
* @return {ol.Size}
*/
ol.size.scale = function(size, ratio, opt_size) {
if (!goog.isDef(opt_size)) {
if (opt_size === undefined) {
opt_size = [0, 0];
}
opt_size[0] = (size[0] * ratio + 0.5) | 0;
@@ -82,7 +82,7 @@ ol.size.toSize = function(size, opt_size) {
return size;
} else {
goog.asserts.assert(goog.isNumber(size));
if (!goog.isDef(opt_size)) {
if (opt_size === undefined) {
opt_size = [size, size];
} else {
opt_size[0] = size;