Skip to content

Commit

Permalink
Added Base.convert
Browse files Browse the repository at this point in the history
  • Loading branch information
sambitdash committed Aug 14, 2017
1 parent c25f1c4 commit 2754aec
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/AlphaNumNumeral.jl
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function Base.parse(::Type{AlphaNumNumeral}, str::String)
return AlphaNumNumeral(val, str)
end

function convert(::Type{AlphaNumNumeral}, val::Int)
function Base.convert(::Type{AlphaNumNumeral}, val::Int)
carr = Vector{Char}()
tval = val
while (tval > 0)
Expand Down
2 changes: 1 addition & 1 deletion src/AlphaNumeral.jl
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function Base.parse(::Type{AlphaNumeral}, str::String)
end
end

function convert(::Type{AlphaNumeral}, val::Int)
function Base.convert(::Type{AlphaNumeral}, val::Int)
if typemin(AlphaNumeral) <= val <= typemax(AlphaNumeral)
n = div(val, 26)
r = rem(val, 26)
Expand Down
2 changes: 1 addition & 1 deletion src/LookupNumeral.jl
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ function Base.parse(::Type{LookupNumeral}, str::String)
end
end

function convert(::Type{LookupNumeral}, val::Int)
function Base.convert(::Type{LookupNumeral}, val::Int)
if !haskey(LOOKUP_N2A, val)
throw(DomainError())
else
Expand Down

0 comments on commit 2754aec

Please sign in to comment.