Skip to content

Commit

Permalink
Fix deprecations (#317)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nosferican authored and ararslan committed Nov 10, 2017
1 parent 7e9d724 commit cd95f18
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/common.jl
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ const RealFP = Union{Float32, Float64}

## conversion from real to fp types

fptype{T<:Union{Float32,Bool,Int8,UInt8,Int16,UInt16}}(::Type{T}) = Float32
fptype{T<:Union{Float64,Int32,UInt32,Int64,UInt64,Int128,UInt128}}(::Type{T}) = Float64
fptype(::Type{T}) where {T<:Union{Float32,Bool,Int8,UInt8,Int16,UInt16}} = Float32
fptype(::Type{T}) where {T<:Union{Float64,Int32,UInt32,Int64,UInt64,Int128,UInt128}} = Float64
fptype(::Type{Complex64}) = Complex64
fptype(::Type{Complex128}) = Complex128

Expand Down
2 changes: 1 addition & 1 deletion src/hist.jl
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ end
# Need a generated function to promote edge types, because a simple
# promote_type(map(eltype, h.edges)...) isn't type stable (tested
# with Julia v0.5).
@generated function _promote_edge_types{N}(edges::NTuple{N,AbstractVector})
@generated function _promote_edge_types(edges::NTuple{N,AbstractVector}) where N
promote_type(map(eltype, edges.parameters)...)
end

Expand Down

0 comments on commit cd95f18

Please sign in to comment.