Skip to content

Commit

Permalink
@something isnt available in 1.6
Browse files Browse the repository at this point in the history
  • Loading branch information
halleysfifthinc committed Aug 23, 2024
1 parent abf8e28 commit e348d05
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/simple.jl
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ function _simpleextrema_base(cmp::F, x::AbstractVector{T}, peaktype::Val) where
i += 2
continue # skip i += 1 at the end of the loop
elseif xip1 == xi # plateau
j = @something findnext(Base.Fix2(!=, xi), x, i+2) lasti+1
j = something(findnext(Base.Fix2(!=, xi), x, i+2), lasti+1)
if j lasti && cmp(x[j], xi) # post
if peaktype === Val(:packed)
pks[i-ioffs] = true
Expand Down Expand Up @@ -336,7 +336,7 @@ function _simd_extrema!(pks::BitVector, cmp::F, x::AbstractVector{T}) where {F,T
j += 2
continue # skip i += 1 at the end of the loop
elseif xip1 == xi # plateau
k = @something findnext(Base.Fix2(!=, xi), x, i+2) lasti+1
k = something(findnext(Base.Fix2(!=, xi), x, i+2), lasti+1)
# @debug "" i,j,k k ≤ lasti, cmp(x[k], xi)
if k lasti && cmp(x[k], xi) # post
pks[j] = true
Expand Down

0 comments on commit e348d05

Please sign in to comment.