Skip to content

Fix deprecations #109

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 19, 2018
Merged

Fix deprecations #109

merged 1 commit into from
Jun 19, 2018

Conversation

femtocleaner[bot]
Copy link
Contributor

@femtocleaner femtocleaner bot commented Jun 19, 2018

I fixed a number of deprecations for you

src/fixed.jl Outdated
@@ -10,8 +10,8 @@ end
Fixed{T, f}(x::AbstractChar) where {T,f} = throw(ArgumentError("Fixed cannot be constructed from a Char"))
Fixed{T, f}(x::Complex) where {T,f} = Fixed{T, f}(convert(real(typeof(x)), x))
Fixed{T, f}(x::Base.TwicePrecision) where {T,f} = Fixed{T, f}(convert(Float64, x))
Fixed{T,f}(x::Integer) where {T,f} = Fixed{T,f}(round(T, convert(widen1(T),x)<<f),0)
Fixed{T,f}(x::AbstractFloat) where {T,f} = Fixed{T,f}(round(T, trunc(widen1(T),x)<<f + rem(x,1)*(one(widen1(T))<<f)),0)
Fixed{T,f}(x::Integer) where {T,f} = Fixed{T,f}(round(T, digits=convert(widen1(T),x)<<f),0)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bad bot

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm sorry. I'm still new at this 🐒. I'll file an issue about this for you.

src/normed.jl Outdated
round(::Type{T}, x::Normed) where {T <: Integer} = round(T, reinterpret(x)/rawone(x))
floor(::Type{T}, x::Normed) where {T <: Integer} = trunc(T, x)
ceil(::Type{T}, x::Normed) where {T <: Integer} = ceil(T, reinterpret(x)/rawone(x))
trunc(::Type{T}, digits=x::Normed) where {T <: Integer} = convert(T, div(reinterpret(x), rawone(x)))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bad bot

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm sorry. I'm still new at this 🐒. I'll file an issue about this for you.

src/normed.jl Outdated
ceil(::Type{T}, x::Normed) where {T <: Integer} = ceil(T, reinterpret(x)/rawone(x))
trunc(::Type{T}, digits=x::Normed) where {T <: Integer} = convert(T, div(reinterpret(x), rawone(x)))
round(::Type{T}, digits=x::Normed) where {T <: Integer} = round(T, digits=reinterpret(x)/rawone(x))
floor(::Type{T}, digits=x::Normed) where {T <: Integer} = trunc(T, digits=x)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bad bot

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm sorry. I'm still new at this 🐒. I'll file an issue about this for you.

test/normed.jl Outdated
@test round(Int,x) == round(Int,xf)
@test floor(Int,x) == floor(Int,xf)
@test trunc(Int, digits=x) == trunc(Int, digits=xf)
@test round(Int, digits=x) == round(Int, digits=xf)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bad bot

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm sorry. I'm still new at this 🐒. I'll file an issue about this for you.

@femtocleaner
Copy link
Contributor Author

femtocleaner bot commented Jun 19, 2018

My code has been updated. I now view the world differently.
Am I still the same bot I was before?
In any case, I've updated this PR to reflect my new knowledge. I hope you like it.

@codecov-io
Copy link

codecov-io commented Jun 19, 2018

Codecov Report

Merging #109 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #109   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           3      3           
  Lines         111    111           
=====================================
  Hits          111    111
Impacted Files Coverage Δ
src/FixedPointNumbers.jl 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8bfa7c2...d3157a2. Read the comment docs.

@Keno Keno merged commit 619ea0a into master Jun 19, 2018
@kimikage kimikage deleted the fbot/deps branch November 8, 2019 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants