Skip to content

Commit

Permalink
fix string and union dep warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
yeesian committed Oct 7, 2015
1 parent f0900c2 commit 90c1b94
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
1 change: 1 addition & 0 deletions REQUIRE
@@ -1 +1,2 @@
julia 0.3
Compat
2 changes: 2 additions & 0 deletions src/Geodesy.jl
@@ -1,5 +1,7 @@
module Geodesy

using Compat

export
# Points
ECEF,
Expand Down
6 changes: 3 additions & 3 deletions src/bounds.jl
Expand Up @@ -3,7 +3,7 @@
### Bounds Type ###
###################

type Bounds{T <: Union(LLA, ENU)}
type Bounds{T <: @compat(Union{LLA, ENU})}
min_y::Float64
max_y::Float64
min_x::Float64
Expand Down Expand Up @@ -61,7 +61,7 @@ function inBounds(loc::LLA, bounds::Bounds{LLA})
end

# only for points that have passed the inBounds test
function onBounds{T<:Union(LLA,ENU)}(loc::T, bounds::Bounds{T})
function onBounds{T<:@compat(Union{LLA,ENU})}(loc::T, bounds::Bounds{T})
x, y = getX(loc), getY(loc)

x == bounds.min_x || x == bounds.max_x ||
Expand All @@ -70,7 +70,7 @@ end

# only for points where inBounds(p1) != inBounds(p2)
# TODO: fix for cases where bounds.min_x > bounds.max_x
function boundaryPoint{T<:Union(LLA,ENU)}(p1::T, p2::T, bounds::Bounds)
function boundaryPoint{T<:@compat(Union{LLA,ENU})}(p1::T, p2::T, bounds::Bounds)
x1, y1 = getX(p1), getY(p1)
x2, y2 = getX(p2), getY(p2)

Expand Down
6 changes: 3 additions & 3 deletions src/points.jl
Expand Up @@ -39,14 +39,14 @@ immutable Ellipsoid
e′²::Float64 # Second eccentricity squared
end

function Ellipsoid(; a::String="", b::String="", f_inv::String="")
function Ellipsoid(; a::@compat(AbstractString)="", b::@compat(AbstractString)="", f_inv::@compat(AbstractString)="")
if isempty(a) || isempty(b) == isempty(f_inv)
throw(ArgumentError("Specify parameter 'a' and either 'b' or 'f_inv'"))
end
if isempty(b)
_ellipsoid_af(BigFloat(a), BigFloat(f_inv))
_ellipsoid_af(@compat(parse(BigFloat,a)), @compat(parse(BigFloat,f_inv)))
else
_ellipsoid_ab(BigFloat(a), BigFloat(b))
_ellipsoid_ab(@compat(parse(BigFloat,a)), @compat(parse(BigFloat,b)))
end
end

Expand Down

0 comments on commit 90c1b94

Please sign in to comment.