Merge pull request #1364 from twpayne/rbush-new-error
Add missing "new"s in ol.structs.RBush
This commit is contained in:
@@ -537,7 +537,7 @@ ol.structs.RBush.prototype.getKey_ = function(value) {
|
|||||||
*/
|
*/
|
||||||
ol.structs.RBush.prototype.insert = function(extent, value) {
|
ol.structs.RBush.prototype.insert = function(extent, value) {
|
||||||
if (goog.DEBUG && this.readers_) {
|
if (goog.DEBUG && this.readers_) {
|
||||||
throw Error('cannot insert value while reading');
|
throw new Error('cannot insert value while reading');
|
||||||
}
|
}
|
||||||
var key = this.getKey_(value);
|
var key = this.getKey_(value);
|
||||||
goog.asserts.assert(!this.valueExtent_.hasOwnProperty(key));
|
goog.asserts.assert(!this.valueExtent_.hasOwnProperty(key));
|
||||||
@@ -587,7 +587,7 @@ ol.structs.RBush.prototype.isEmpty = function() {
|
|||||||
*/
|
*/
|
||||||
ol.structs.RBush.prototype.remove = function(value) {
|
ol.structs.RBush.prototype.remove = function(value) {
|
||||||
if (goog.DEBUG && this.readers_) {
|
if (goog.DEBUG && this.readers_) {
|
||||||
throw Error('cannot remove value while reading');
|
throw new Error('cannot remove value while reading');
|
||||||
}
|
}
|
||||||
var key = this.getKey_(value);
|
var key = this.getKey_(value);
|
||||||
goog.asserts.assert(this.valueExtent_.hasOwnProperty(key));
|
goog.asserts.assert(this.valueExtent_.hasOwnProperty(key));
|
||||||
@@ -685,7 +685,7 @@ ol.structs.RBush.prototype.splitRoot_ = function(node1, node2) {
|
|||||||
*/
|
*/
|
||||||
ol.structs.RBush.prototype.update = function(extent, value) {
|
ol.structs.RBush.prototype.update = function(extent, value) {
|
||||||
if (goog.DEBUG && this.readers_) {
|
if (goog.DEBUG && this.readers_) {
|
||||||
throw Error('cannot update value while reading');
|
throw new Error('cannot update value while reading');
|
||||||
}
|
}
|
||||||
var key = this.getKey_(value);
|
var key = this.getKey_(value);
|
||||||
var currentExtent = this.valueExtent_[key];
|
var currentExtent = this.valueExtent_[key];
|
||||||
|
|||||||
Reference in New Issue
Block a user