Skip to content

Commit

Permalink
Remove a couple extra deprecated identifiers
Browse files Browse the repository at this point in the history
  • Loading branch information
Keno committed Aug 7, 2018
1 parent 0e9a3c5 commit 261630f
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions src/FixedPointNumbers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@ import Base: ==, <, <=, -, +, *, /, ~, isapprox,
zero, oneunit, one, typemin, typemax, floatmin, floatmax, eps, sizeof, reinterpret,
float, trunc, round, floor, ceil, bswap,
div, fld, rem, mod, mod1, fld1, min, max, minmax,
start, next, done, rand
if isdefined(Base, :rem1)
import Base: rem1
end
rand

using Base: @pure

# T => BaseType
Expand Down Expand Up @@ -153,10 +151,7 @@ for f in (:div, :fld, :fld1)
$f(x::T, y::T) where {T <: FixedPoint} = $f(reinterpret(x),reinterpret(y))
end
end
for f in (:rem, :mod, :mod1, :rem1, :min, :max)
if f === :rem1 && !isdefined(Base, :rem1)
continue
end
for f in (:rem, :mod, :mod1, :min, :max)
@eval begin
$f(x::T, y::T) where {T <: FixedPoint} = T($f(reinterpret(x),reinterpret(y)),0)
end
Expand Down

0 comments on commit 261630f

Please sign in to comment.