Remove opt_ prefix

This commit is contained in:
Tim Schaub
2022-08-11 17:46:31 -06:00
committed by Tim Schaub
parent dd1edc37ca
commit 99612e7f9a
183 changed files with 1918 additions and 2079 deletions
+5 -6
View File
@@ -23,16 +23,15 @@ import {assert} from '../asserts.js';
*/
class LRUCache {
/**
* @param {number} [opt_highWaterMark] High water mark.
* @param {number} [highWaterMark] High water mark.
*/
constructor(opt_highWaterMark) {
constructor(highWaterMark) {
/**
* Desired max cache size after expireCache(). If set to 0, no cache entries
* will be pruned at all.
* @type {number}
*/
this.highWaterMark =
opt_highWaterMark !== undefined ? opt_highWaterMark : 2048;
this.highWaterMark = highWaterMark !== undefined ? highWaterMark : 2048;
/**
* @private
@@ -110,10 +109,10 @@ class LRUCache {
/**
* @param {string} key Key.
* @param {*} [opt_options] Options (reserved for subclasses).
* @param {*} [options] Options (reserved for subclasses).
* @return {T} Value.
*/
get(key, opt_options) {
get(key, options) {
const entry = this.entries_[key];
assert(entry !== undefined, 15); // Tried to get a value for a key that does not exist in the cache
if (entry === this.newest_) {
+3 -3
View File
@@ -15,10 +15,10 @@
*/
class LinkedList {
/**
* @param {boolean} [opt_circular] The last item is connected to the first one,
* @param {boolean} [circular] The last item is connected to the first one,
* and the first item to the last one. Default is true.
*/
constructor(opt_circular) {
constructor(circular) {
/**
* @private
* @type {Item|undefined}
@@ -41,7 +41,7 @@ class LinkedList {
* @private
* @type {boolean}
*/
this.circular_ = opt_circular === undefined ? true : opt_circular;
this.circular_ = circular === undefined ? true : circular;
/**
* @private
+6 -12
View File
@@ -24,13 +24,13 @@ import {isEmpty} from '../obj.js';
*/
class RBush {
/**
* @param {number} [opt_maxEntries] Max entries.
* @param {number} [maxEntries] Max entries.
*/
constructor(opt_maxEntries) {
constructor(maxEntries) {
/**
* @private
*/
this.rbush_ = new RBush_(opt_maxEntries);
this.rbush_ = new RBush_(maxEntries);
/**
* A mapping between the objects added to this rbush wrapper
@@ -198,18 +198,12 @@ class RBush {
}
/**
* @param {import("../extent.js").Extent} [opt_extent] Extent.
* @param {import("../extent.js").Extent} [extent] Extent.
* @return {import("../extent.js").Extent} Extent.
*/
getExtent(opt_extent) {
getExtent(extent) {
const data = this.rbush_.toJSON();
return createOrUpdate(
data.minX,
data.minY,
data.maxX,
data.maxY,
opt_extent
);
return createOrUpdate(data.minX, data.minY, data.maxX, data.maxY, extent);
}
/**