Skip to content

Commit 5c4695e

Browse files
authored
Remove @_inline_meta by @inline (#171)
1 parent bdafcba commit 5c4695e

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

src/infrange.jl

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -193,13 +193,11 @@ _sub2ind(inds::Tuple{OneToInf}, i::Integer) = i
193193
to_shape(::OneToInf) = ℵ₀
194194

195195
# used for linear indexing
196-
function _ind2sub_recurse(inds::Tuple{OneToInf{Int},Vararg{Any}}, ind::Integer)
197-
@_inline_meta
196+
@inline function _ind2sub_recurse(inds::Tuple{OneToInf{Int},Vararg{Any}}, ind::Integer)
198197
(ind+1, _ind2sub_recurse(tail(inds), 0)...)
199198
end
200199

201-
function _ind2sub_recurse(indslast::Tuple{OneToInf{Int}}, ind::Integer)
202-
@_inline_meta
200+
@inline function _ind2sub_recurse(indslast::Tuple{OneToInf{Int}}, ind::Integer)
203201
(ind+1,)
204202
end
205203

@@ -259,31 +257,27 @@ getindex(r::AbstractInfUnitRange, s::Slice{<:AbstractInfUnitRange{<:Integer}}) =
259257

260258
getindex(r::OneToInf{T}, s::OneTo) where T = OneTo(T(s.stop))
261259

262-
function getindex(r::AbstractInfUnitRange, s::InfStepRange{<:Integer})
263-
@_inline_meta
260+
@inline function getindex(r::AbstractInfUnitRange, s::InfStepRange{<:Integer})
264261
@boundscheck (step(s) > 0 && first(s) 1) || throw(BoundsError(r, minimum(s)))
265262
st = oftype(first(r), first(r) + s.start-1)
266263
new_step = step(s)
267264
InfStepRange(st,new_step)
268265
end
269266

270-
function getindex(r::AbstractInfUnitRange, s::StepRange{<:Integer})
271-
@_inline_meta
267+
@inline function getindex(r::AbstractInfUnitRange, s::StepRange{<:Integer})
272268
@boundscheck minimum(s) 1 || throw(BoundsError(r, minimum(s)))
273269
st = oftype(first(r), first(r) + s.start-1)
274270
range(st; step=step(s), length=length(s))
275271
end
276272

277-
function getindex(r::InfStepRange, s::InfAxes)
278-
@_inline_meta
273+
@inline function getindex(r::InfStepRange, s::InfAxes)
279274
@boundscheck (step(s) > 0 && first(s) 1) || throw(BoundsError(r, minimum(s)))
280275
st = oftype(r.start, r.start + (first(s)-1)*step(r))
281276
new_step = step(r)*step(s)
282277
InfStepRange(st,new_step)
283278
end
284279

285-
function getindex(r::InfStepRange, s::AbstractRange{<:Integer})
286-
@_inline_meta
280+
@inline function getindex(r::InfStepRange, s::AbstractRange{<:Integer})
287281
@boundscheck isempty(s) || minimum(s) 1 || throw(BoundsError(r, minimum(s)))
288282
st = oftype(r.start, r.start + (first(s)-1)*step(r))
289283
range(st; step=step(r)*step(s), length=length(s))

0 commit comments

Comments
 (0)