Skip to content

Commit a9087f9

Browse files
authored
Fix errors identified by report_package() (#14)
1 parent cdbde55 commit a9087f9

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/rtree/adjust.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@ function _condense!(node::Node, tree::RTree, tmpdetached::AbstractVector{<:Node}
3636
if length(node) < min_load
3737
# used space less than the minimum
3838
# 1. eliminate node entry from the parent. deleteEntry will fix the parent's MBR.
39-
_detach!(parent, node_ix, tree)
39+
_detach!(parent(node), node_ix, tree)
4040
# 2. add this node to the stack in order to reinsert its entries.
4141
push!(tmpdetached, node)
4242
else
4343
# global recalculation necessary since the MBR can only shrink in size,
4444
# due to data removal.
45-
tree.tight_mbrs && syncmbr(parent(node))
45+
tree.tight_mbrs && syncmbr!(parent(node))
4646
end
4747

4848
return _condense!(parent(node), tree, tmpdetached)

src/rtree/split.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ end
8181
# pick the two seeds (children indices) for splitting the node into two
8282
function _splitseeds(node::Node, tree::RTree)
8383
length(node) > 1 ||
84-
throw(SpatialIndexError("Cannot split the node with less than 2 children"))
84+
throw(SpatialIndexException("Cannot split the node with less than 2 children"))
8585

8686
if variant(tree) == RTreeLinear || variant(tree) == RTreeStar
8787
return _splitseeds_linear(node)
@@ -245,6 +245,6 @@ function _split!(node::Node, tree::RTree)
245245
elseif variant(tree) == RTreeStar
246246
return _split!_rstar(node, tree)
247247
else
248-
throw(SpatialIndexError("RTree variant not supported"))
248+
throw(SpatialIndexException("RTree variant not supported"))
249249
end
250250
end

0 commit comments

Comments
 (0)