From 183e704dc240463317ffce4ac454511d1712f54d Mon Sep 17 00:00:00 2001 From: Robin Deits Date: Sat, 4 Aug 2018 00:14:21 -0400 Subject: [PATCH] fix more deprecations on 0.7-rc2 --- REQUIRE | 2 +- src/Colors.jl | 2 -- src/conversions.jl | 4 ++-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/REQUIRE b/REQUIRE index 9400ecdd..df1ee2fb 100644 --- a/REQUIRE +++ b/REQUIRE @@ -1,4 +1,4 @@ -julia 0.7-alpha +julia 0.7-rc2 ColorTypes 0.7.0 FixedPointNumbers 0.5.0 Reexport diff --git a/src/Colors.jl b/src/Colors.jl index f7f79b14..1808e0f7 100644 --- a/src/Colors.jl +++ b/src/Colors.jl @@ -1,5 +1,3 @@ -__precompile__() - module Colors using FixedPointNumbers, ColorTypes, Reexport, Printf diff --git a/src/conversions.jl b/src/conversions.jl index 932b667b..706c79d5 100644 --- a/src/conversions.jl +++ b/src/conversions.jl @@ -167,8 +167,8 @@ cnvt(::Type{CV}, c::LCHab) where {CV<:AbstractRGB} = cnvt(CV, convert(Lab{eltyp cnvt(::Type{CV}, c::LCHuv) where {CV<:AbstractRGB} = cnvt(CV, convert(Luv{eltype(c)}, c)) cnvt(::Type{CV}, c::Color3) where {CV<:AbstractRGB} = cnvt(CV, convert(XYZ{eltype(c)}, c)) -cnvt(::Type{CV}, c::RGB24) where {CV<:AbstractRGB{N0f8}} = CV(N0f8(c.color&0x00ff0000>>>16,0), N0f8(c.color&0x0000ff00>>>8,0), N0f8(c.color&0x000000ff,0)) -cnvt(::Type{CV}, c::RGB24) where {CV<:AbstractRGB} = CV((c.color&0x00ff0000>>>16)/255, ((c.color&0x0000ff00)>>>8)/255, (c.color&0x000000ff)/255) +cnvt(::Type{CV}, c::RGB24) where {CV<:AbstractRGB{N0f8}} = CV(N0f8((c.color&0x00ff0000)>>>16,0), N0f8((c.color&0x0000ff00)>>>8,0), N0f8(c.color&0x000000ff,0)) +cnvt(::Type{CV}, c::RGB24) where {CV<:AbstractRGB} = CV(((c.color&0x00ff0000)>>>16)/255, (((c.color&0x0000ff00))>>>8)/255, (c.color&0x000000ff)/255) function cnvt(::Type{CV}, c::AbstractGray) where CV<:AbstractRGB g = convert(eltype(CV), gray(c))