Skip to content

Commit

Permalink
Fix deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
femtocleaner[bot] committed Jun 9, 2018
1 parent 24c6b1f commit a728e95
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/JuMPContainer.jl
Expand Up @@ -19,7 +19,7 @@ mutable struct JuMPDict{T,N} <: JuMPContainer{T,N}
tupledict::Dict{NTuple{N,Any},T}
meta::Dict{Symbol,Any}

(::Type{JuMPDict{T,N}}){T,N}() = new{T,N}(Dict{NTuple{N,Any},T}(), Dict{Symbol,Any}())
JuMPDict{T,N}() where {T,N} = new{T,N}(Dict{NTuple{N,Any},T}(), Dict{Symbol,Any}())
end

function JuMPDict(d::Dict{NTuple{N,Any},T}) where {T,N}
Expand Down Expand Up @@ -211,7 +211,7 @@ mutable struct KeyIterator{JA<:JuMPArray}
x::JA
dim::Int
next_k_cache::Array{Any,1}
function (::Type{KeyIterator{JA}}){JA}(d)
function KeyIterator{JA}(d) where JA
n = ndims(d.innerArray)
new{JA}(d, n, Array{Any}(n+1))
end
Expand Down
2 changes: 1 addition & 1 deletion src/norms.jl
Expand Up @@ -108,7 +108,7 @@ getvalue(n::GenericNormExpr) = n.coeff * getvalue(n.norm) + getvalue(n.aff)
# α||Ax-b||₂ + cᵀx + d ≤ 0
mutable struct GenericSOCConstraint{T<:GenericSOCExpr} <: AbstractConstraint
normexpr::T
function (::Type{GenericSOCConstraint{T}}){T}(normexpr::T)
function GenericSOCConstraint{T}(normexpr::T) where T
if normexpr.coeff < 0
# The coefficient in front of the norm is negative, which
# means we have `norm >= c`, which is not convex.
Expand Down

0 comments on commit a728e95

Please sign in to comment.