Skip to content

Commit

Permalink
Reindent code
Browse files Browse the repository at this point in the history
  • Loading branch information
blegat committed Jun 21, 2018
1 parent 2adc7f9 commit c5c3633
Show file tree
Hide file tree
Showing 9 changed files with 712 additions and 712 deletions.
30 changes: 15 additions & 15 deletions src/CDDLib.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,35 +6,35 @@ using BinDeps
using Polyhedra

if isfile(joinpath(dirname(@__FILE__),"..","deps","deps.jl"))
include("../deps/deps.jl")
include("../deps/deps.jl")
else
error("CDDLib not properly installed. Please run Pkg.build(\"CDDLib\")")
error("CDDLib not properly installed. Please run Pkg.build(\"CDDLib\")")
end

macro dd_ccall(f, args...)
quote
ret = ccall(($"dd_$f", libcdd), $(map(esc,args)...))
ret
end
quote
ret = ccall(($"dd_$f", libcdd), $(map(esc,args)...))
ret
end
end

macro ddf_ccall(f, args...)
quote
ret = ccall(($"ddf_$f", libcdd), $(map(esc,args)...))
ret
end
quote
ret = ccall(($"ddf_$f", libcdd), $(map(esc,args)...))
ret
end
end


macro cdd_ccall(f, args...)
quote
ret = ccall(($"$f", libcdd), $(map(esc,args)...))
ret
end
quote
ret = ccall(($"$f", libcdd), $(map(esc,args)...))
ret
end
end

function __init__()
@dd_ccall set_global_constants Void ()
@dd_ccall set_global_constants Void ()
end

import Base.convert, Base.push!, Base.eltype, Base.copy
Expand Down
10 changes: 5 additions & 5 deletions src/error.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ error_message = [
"LP cycling",
"Numerically inconsistent"]
function myerror(err::Cdd_ErrorType)
if err < 0 || err > 17
error("This should not happen, please report this bug")
elseif err < 17 # 17 means no error
error(error_message[err+1])
end
if err < 0 || err > 17
error("This should not happen, please report this bug")
elseif err < 17 # 17 means no error
error(error_message[err+1])
end
end
Loading

0 comments on commit c5c3633

Please sign in to comment.