|
95 | 95 | end
|
96 | 96 | end
|
97 | 97 |
|
98 |
| -@propagate_inbounds function getindex(a::StaticArray, inds::StaticArray{<:Any, Int}) |
| 98 | +@propagate_inbounds function getindex(a::StaticArray, inds::StaticVector{<:Any, Int}) |
99 | 99 | _getindex(a, Length(inds), inds)
|
100 | 100 | end
|
101 | 101 |
|
102 |
| -@generated function _getindex(a::StaticArray, ::Length{L}, inds::StaticArray{<:Any, Int}) where {L} |
| 102 | +@generated function _getindex(a::StaticArray, ::Length{L}, inds::StaticVector{<:Any, Int}) where {L} |
103 | 103 | exprs = [:(a[inds[$i]]) for i = 1:L]
|
104 | 104 | return quote
|
105 | 105 | @_propagate_inbounds_meta
|
@@ -142,20 +142,20 @@ end
|
142 | 142 | end
|
143 | 143 | end
|
144 | 144 |
|
145 |
| -@propagate_inbounds function setindex!(a::StaticArray, v, inds::StaticArray{<:Any, Int}) |
| 145 | +@propagate_inbounds function setindex!(a::StaticArray, v, inds::StaticVector{<:Any, Int}) |
146 | 146 | _setindex!(a, v, Length(inds), inds)
|
147 | 147 | return v
|
148 | 148 | end
|
149 | 149 |
|
150 |
| -@generated function _setindex!(a::StaticArray, v, ::Length{L}, inds::StaticArray{<:Any, Int}) where {L} |
| 150 | +@generated function _setindex!(a::StaticArray, v, ::Length{L}, inds::StaticVector{<:Any, Int}) where {L} |
151 | 151 | exprs = [:(a[inds[$i]] = v) for i = 1:L]
|
152 | 152 | return quote
|
153 | 153 | @_propagate_inbounds_meta
|
154 | 154 | similar_type(a, Size(L))(tuple($(exprs...)))
|
155 | 155 | end
|
156 | 156 | end
|
157 | 157 |
|
158 |
| -@generated function _setindex!(a::StaticArray, v::AbstractArray, ::Length{L}, inds::StaticArray{<:Any, Int}) where {L} |
| 158 | +@generated function _setindex!(a::StaticArray, v::AbstractArray, ::Length{L}, inds::StaticVector{<:Any, Int}) where {L} |
159 | 159 | exprs = [:(a[$i] = v[$i]) for i = 1:L]
|
160 | 160 | return quote
|
161 | 161 | @_propagate_inbounds_meta
|
|
166 | 166 | end
|
167 | 167 | end
|
168 | 168 |
|
169 |
| -@generated function _setindex!(a::StaticArray, v::StaticArray, ::Length{L}, inds::StaticArray{<:Any, Int}) where {L} |
| 169 | +@generated function _setindex!(a::StaticArray, v::StaticArray, ::Length{L}, inds::StaticVector{<:Any, Int}) where {L} |
170 | 170 | exprs = [:(a[$i] = v[$i]) for i = 1:L]
|
171 | 171 | return quote
|
172 | 172 | @_propagate_inbounds_meta
|
|
0 commit comments