Skip to content

Commit

Permalink
add boundscheck annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
Joroks committed Sep 4, 2024
1 parent a927265 commit 01e3677
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/LAMMPS.jl
Original file line number Diff line number Diff line change
Expand Up @@ -963,7 +963,7 @@ struct NeighListVec <: AbstractVector{Int32}
end

function Base.getindex(nle::NeighListVec, i::Integer)
1 <= i <= nle.numneigh || throw(BoundsError(nle, i))
@boundscheck 1 <= i <= nle.numneigh || throw(BoundsError(nle, i))
return unsafe_load(nle.neighbors, i)+1
end

Expand Down

0 comments on commit 01e3677

Please sign in to comment.