Skip to content
This repository has been archived by the owner on Nov 22, 2023. It is now read-only.

Commit

Permalink
Merge pull request #138 from JuliaGeometry/fbot/deps
Browse files Browse the repository at this point in the history
Fix deprecations
  • Loading branch information
rdeits committed Aug 8, 2018
2 parents 36bd44b + e2b17e8 commit dcaffbd
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 15 deletions.
8 changes: 2 additions & 6 deletions src/decompose.jl
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
# Handle https://github.com/JuliaLang/julia/pull/23750
@static if VERSION >= v"0.7.0-DEV.2083"
_reshape_reinterpret(T, X, d...) = reshape(reinterpret(T, X), d...)
else
_reshape_reinterpret(T, X, d...) = reinterpret(T, X, d...)
end
_reshape_reinterpret(T, X, d...) = reshape(reinterpret(T, X), d...)
# TODO: when we drop support for Julia v0.6, change all instances of
# _reshape_reinterpret(T, X, d...) to reshape(reinterpret(T, X), d...)

Expand Down Expand Up @@ -392,7 +388,7 @@ function decompose(PT::Type{UV{T}}, s::Sphere, facets = 24) where T
vertices = decompose(Point{3, T}, s, facets)
o5 = T(0.5)
map(vertices) do n
u = atan2(n[1], n[3]) / T(2*pi) + o5
u = atan(n[1], n[3]) / T(2*pi) + o5
v = n[2] * o5 + o5
UV{Float32}(u, v)
end
Expand Down
10 changes: 3 additions & 7 deletions src/meshes.jl
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
# Gracefully handle the change in `filter(::Function, ::Dict)` from
# https://github.com/JuliaLang/julia/pull/23311
@static if VERSION >= v"0.7.0-DEV.1393"
function filter_2_arg(f_2_arg, args...)
f_1_arg = x -> f_2_arg(x[1], x[2])
filter(f_1_arg, args...)
end
else
const filter_2_arg = filter
function filter_2_arg(f_2_arg, args...)
f_1_arg = x -> f_2_arg(x[1], x[2])
filter(f_1_arg, args...)
end
# TODO: When we drop v0.6, we can change all the calls back to
# Base.filter. We'll have to change the functions from 2-arg to 1-arg,
Expand Down
4 changes: 2 additions & 2 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using GeometryTypes, ColorTypes
using Compat
using Compat: range
using Compat.Test
using Compat.Test: @inferred
using Test
using Test: @inferred
using Compat.LinearAlgebra


Expand Down

0 comments on commit dcaffbd

Please sign in to comment.