From fc467e1d728f285e7bfc12ad41bbd2979b1a73a9 Mon Sep 17 00:00:00 2001 From: schillic Date: Sat, 9 Mar 2024 10:34:18 +0100 Subject: [PATCH] use eachindex instead of 1:length --- src/BackwardAlgorithms/PolyhedraBackward.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/BackwardAlgorithms/PolyhedraBackward.jl b/src/BackwardAlgorithms/PolyhedraBackward.jl index 24c0853..deac388 100644 --- a/src/BackwardAlgorithms/PolyhedraBackward.jl +++ b/src/BackwardAlgorithms/PolyhedraBackward.jl @@ -327,7 +327,7 @@ function _linear_map_inverse(d::AbstractVector{<:Number}, P::LazySet) end if has_undefs # there were redundant constraints, so remove them constraints_MP = [constraints_MP[i] - for i in 1:length(constraints_MP) + for i in eachindex(constraints_MP) if isassigned(constraints_MP, i)] end if isempty(constraints_MP)