From edbfc72b5296777849373a50f5b4487a53a37e55 Mon Sep 17 00:00:00 2001 From: Jakob Nybo Nissen Date: Wed, 22 Sep 2021 08:20:17 +0200 Subject: [PATCH] Re-add inbounds annotation --- base/array.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/base/array.jl b/base/array.jl index ab42221519c786..2c5f3e44b76c8f 100644 --- a/base/array.jl +++ b/base/array.jl @@ -2354,7 +2354,7 @@ end function _findall!(I::Vector, invert::Bool, A::AbstractArray{Bool}) cnt = 1 len = length(I) - for (k, v) in pairs(A) + @inbounds for (k, v) in pairs(A) cnt > len && break I[cnt] = k cnt += v ⊻ invert @@ -2366,7 +2366,7 @@ function _findall!(I::Vector, invert::Bool, A::AbstractVector{Bool}) i = firstindex(A) cnt = 1 len = length(I) - while cnt ≤ len + @inbounds while cnt ≤ len I[cnt] = i cnt += A[i] ⊻ invert i = nextind(A, i)