From a9087f99ff3b3ab3c72c1ffe94c29e6a92f52f5f Mon Sep 17 00:00:00 2001 From: Daniel VandenHeuvel <95613936+DanielVandH@users.noreply.github.com> Date: Wed, 8 Nov 2023 12:40:15 +1000 Subject: [PATCH] Fix errors identified by report_package() (#14) --- src/rtree/adjust.jl | 4 ++-- src/rtree/split.jl | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/rtree/adjust.jl b/src/rtree/adjust.jl index 73da4d6..cf39db4 100644 --- a/src/rtree/adjust.jl +++ b/src/rtree/adjust.jl @@ -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) diff --git a/src/rtree/split.jl b/src/rtree/split.jl index f66e581..14c2261 100644 --- a/src/rtree/split.jl +++ b/src/rtree/split.jl @@ -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) @@ -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