diff --git a/src/nonlinear.jl b/src/nonlinear.jl index 870101de..9c3a77fe 100644 --- a/src/nonlinear.jl +++ b/src/nonlinear.jl @@ -31,7 +31,7 @@ Returns the SCIP expression pointer, whether the expression is a pure value (wit function push_expr!( nonlin::NonlinExpr, scip::Ptr{SCIP_}, - vars::Dict{VarRef,Ref{Ptr{SCIP_VAR}}}, + vars::Dict{VarRef,<:Ref{Ptr{SCIP_VAR}}}, expr::Expr, ) # Storage for SCIP_EXPR* @@ -262,7 +262,7 @@ end function push_expr!( nonlin::NonlinExpr, scip::Ptr{SCIP_}, - vars::Dict{VarRef,Ref{Ptr{SCIP_VAR}}}, + vars::Dict{VarRef,<:Ref{Ptr{SCIP_VAR}}}, expr::Number, ) # Storage for SCIP_EXPR* diff --git a/src/scip_data.jl b/src/scip_data.jl index dbb1fef5..9d8b22e8 100644 --- a/src/scip_data.jl +++ b/src/scip_data.jl @@ -31,9 +31,9 @@ SCIPData holds pointers to SCIP data. It does not perform memory management and should not be created directly. """ mutable struct SCIPData - scip::Ref{Ptr{SCIP_}} - vars::Dict{VarRef,Ref{Ptr{SCIP_VAR}}} - conss::Dict{ConsRef,Ref{Ptr{SCIP_CONS}}} + scip::Base.RefValue{Ptr{SCIP_}} + vars::Dict{VarRef,Base.RefValue{Ptr{SCIP_VAR}}} + conss::Dict{ConsRef,Base.RefValue{Ptr{SCIP_CONS}}} var_count::Int64 cons_count::Int64 @@ -69,8 +69,8 @@ mutable struct SCIPData @SCIP_CALL SCIPcreateProbBasic(scip[], "") scip_data = new( scip, - Dict{VarRef,Ref{Ptr{SCIP_VAR}}}(), - Dict{ConsRef,Ref{Ptr{SCIP_CONS}}}(), + Dict{VarRef,Base.RefValue{Ptr{SCIP_VAR}}}(), + Dict{ConsRef,Base.RefValue{Ptr{SCIP_CONS}}}(), 0, 0, Dict{Any,Ptr{SCIP_CONSHDLR}}(), diff --git a/src/sepa.jl b/src/sepa.jl index 3e7455af..78bb5d16 100644 --- a/src/sepa.jl +++ b/src/sepa.jl @@ -215,7 +215,7 @@ associated to the separator `sepa`. """ function add_cut_sepa( scip::Ptr{SCIP_}, - vars::Dict{VarRef,Ref{Ptr{SCIP_VAR}}}, + vars::Dict{VarRef,<:Ref{Ptr{SCIP_VAR}}}, sepas::Dict{Any,Ptr{SCIP_SEPA}}, sepa::SEPA, varrefs,