Skip to content

Commit

Permalink
fix #18051, allocation in sparse vector getindex
Browse files Browse the repository at this point in the history
Caused by the return type of `ord()` being unknown.

(cherry picked from commit b74bc6f)
ref #18060
  • Loading branch information
JeffBezanson authored and tkelman committed Aug 20, 2016
1 parent 1aa1175 commit 42a3262
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions base/sort.jl
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ for s in [:searchsortedfirst, :searchsortedlast, :searchsorted]
$s(v::AbstractVector, x;
lt=isless, by=identity, rev::Bool=false, order::Ordering=Forward) =
$s(v,x,ord(lt,by,rev,order))
$s(v::AbstractVector, x) = $s(v, x, Forward)
end
end

Expand Down

0 comments on commit 42a3262

Please sign in to comment.