From a3a1a3fb39ff851c79c4a073c8e0a5cd3ed9fb32 Mon Sep 17 00:00:00 2001 From: guo-yong-zhi <55872791+guo-yong-zhi@users.noreply.github.com> Date: Fri, 8 Nov 2024 00:46:56 +0800 Subject: [PATCH] perf: add @propagate_inbounds to getindex for AbstractSpacialQTree --- src/qtrees.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qtrees.jl b/src/qtrees.jl index 33d5f9e..95702e4 100644 --- a/src/qtrees.jl +++ b/src/qtrees.jl @@ -386,7 +386,7 @@ function Base.empty!(t::AbstractSpacialQTree, label::Int) end function tree(t::AbstractSpacialQTree) end Base.iterate(t::AbstractSpacialQTree, args...) = iterate(tree(t), args...) Base.get(t::AbstractSpacialQTree, args...) = get(tree(t), args...) -Base.getindex(t::AbstractSpacialQTree, args...) = getindex(tree(t), args...) +Base.@propagate_inbounds Base.getindex(t::AbstractSpacialQTree, args...) = getindex(tree(t), args...) Base.keys(t::AbstractSpacialQTree) = keys(tree(t)) Base.values(t::AbstractSpacialQTree) = values(tree(t)) Base.haskey(t::AbstractSpacialQTree, args...) = haskey(tree(t), args...)