Skip to content

Commit 7241c90

Browse files
committed
avoid stackoverflow
1 parent 54f737b commit 7241c90

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/abstractsparsearrayinterface.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,9 @@ struct StoredValues{T,A<:AbstractArray{T},I} <: AbstractVector{T}
7979
end
8080
StoredValues(a::AbstractArray) = StoredValues(a, to_vec(eachstoredindex(a)))
8181
Base.size(a::StoredValues) = size(a.storedindices)
82-
Base.getindex(a::StoredValues, I::Int) = getstoredindex(a.array, a.storedindices[I])
83-
function Base.setindex!(a::StoredValues, value, I::Int)
84-
return setstoredindex!(a.array, value, a.storedindices[I])
82+
@inline Base.getindex(a::StoredValues, I::Int) = getindex(a.array, a.storedindices[I])
83+
@inline function Base.setindex!(a::StoredValues, value, I::Int)
84+
return setindex!(a.array, value, a.storedindices[I])
8585
end
8686

8787
# TODO: This may need to be defined in `sparsearraydok.jl`, after `SparseArrayDOK`

0 commit comments

Comments
 (0)