Skip to content

Commit 684b05a

Browse files
committed
Fixes for Julia 0.6
1 parent fbc5d58 commit 684b05a

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/OffsetArrays.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,12 @@ end
8383
@inbounds ret = parent(A)[offset(A.offsets, I)...]
8484
ret
8585
end
86-
@inline function Base._getindex(::LinearFast, A::OffsetVector, i::Int)
86+
@inline function Base.getindex(A::OffsetVector, i::Int)
8787
checkbounds(A, i)
8888
@inbounds ret = parent(A)[offset(A.offsets, (i,))[1]]
8989
ret
9090
end
91-
@inline function Base._getindex(::LinearFast, A::OffsetArray, i::Int)
91+
@inline function Base.getindex(A::OffsetArray, i::Int)
9292
checkbounds(A, i)
9393
@inbounds ret = parent(A)[i]
9494
ret
@@ -98,12 +98,12 @@ end
9898
@inbounds parent(A)[offset(A.offsets, I)...] = val
9999
val
100100
end
101-
@inline function Base._setindex!(::LinearFast, A::OffsetVector, val, i::Int)
101+
@inline function Base.setindex!(A::OffsetVector, val, i::Int)
102102
checkbounds(A, i)
103103
@inbounds parent(A)[offset(A.offsets, (i,))[1]] = val
104104
val
105105
end
106-
@inline function Base._setindex!(::LinearFast, A::OffsetArray, val, i::Int)
106+
@inline function Base.setindex!(A::OffsetArray, val, i::Int)
107107
checkbounds(A, i)
108108
@inbounds parent(A)[i] = val
109109
val

test/runtests.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ seek(io, 0)
311311
@test readdlm(io, eltype(A)) == parent(A)
312312

313313
amin, amax = extrema(parent(A))
314-
@test clamp(A, (amax+amin)/2, amax) == clamp(parent(A), (amax+amin)/2, amax)
314+
@test clamp.(A, (amax+amin)/2, amax) == OffsetArray(clamp.(parent(A), (amax+amin)/2, amax), indices(A))
315315

316316
@test unique(A, 1) == parent(A)
317317
@test unique(A, 2) == parent(A)

0 commit comments

Comments
 (0)