Skip to content

Commit

Permalink
propagate inbounds in getindex (#39)
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnychen94 authored Oct 11, 2020
1 parent d7e2c80 commit ff689b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/PaddedViews.jl
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ Base.size(A::PaddedView) = map(length, axes(A))

Base.parent(A::PaddedView) = A.data

@inline function Base.getindex(A::PaddedView{T,N}, i::Vararg{Int,N}) where {T,N}
Base.@propagate_inbounds function Base.getindex(A::PaddedView{T,N}, i::Vararg{Int,N}) where {T,N}
@boundscheck checkbounds(A, i...)
if Base.checkbounds(Bool, A.data, i...)
return convert(T, A.data[i...])
Expand Down

0 comments on commit ff689b1

Please sign in to comment.