Skip to content

Commit

Permalink
Fix errors identified by report_package() (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielVandH authored Nov 8, 2023
1 parent cdbde55 commit a9087f9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/rtree/adjust.jl
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ function _condense!(node::Node, tree::RTree, tmpdetached::AbstractVector{<:Node}
if length(node) < min_load
# used space less than the minimum
# 1. eliminate node entry from the parent. deleteEntry will fix the parent's MBR.
_detach!(parent, node_ix, tree)
_detach!(parent(node), node_ix, tree)
# 2. add this node to the stack in order to reinsert its entries.
push!(tmpdetached, node)
else
# global recalculation necessary since the MBR can only shrink in size,
# due to data removal.
tree.tight_mbrs && syncmbr(parent(node))
tree.tight_mbrs && syncmbr!(parent(node))
end

return _condense!(parent(node), tree, tmpdetached)
Expand Down
4 changes: 2 additions & 2 deletions src/rtree/split.jl
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ end
# pick the two seeds (children indices) for splitting the node into two
function _splitseeds(node::Node, tree::RTree)
length(node) > 1 ||
throw(SpatialIndexError("Cannot split the node with less than 2 children"))
throw(SpatialIndexException("Cannot split the node with less than 2 children"))

if variant(tree) == RTreeLinear || variant(tree) == RTreeStar
return _splitseeds_linear(node)
Expand Down Expand Up @@ -245,6 +245,6 @@ function _split!(node::Node, tree::RTree)
elseif variant(tree) == RTreeStar
return _split!_rstar(node, tree)
else
throw(SpatialIndexError("RTree variant not supported"))
throw(SpatialIndexException("RTree variant not supported"))
end
end

0 comments on commit a9087f9

Please sign in to comment.