Skip to content

Commit

Permalink
Return copy of function
Browse files Browse the repository at this point in the history
  • Loading branch information
odow committed Oct 28, 2023
1 parent e79694d commit 4b3df11
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Bridges/Constraint/bridges/indicator_to_milp.jl
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ function MOI.get(
::MOI.ConstraintFunction,
bridge::IndicatorToMILPBridge,
)
return bridge.f
return copy(bridge.f)
end

function MOI.get(
Expand Down
2 changes: 1 addition & 1 deletion src/Bridges/Constraint/bridges/sos1_to_milp.jl
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ function MOI.get(
::MOI.ConstraintFunction,
bridge::SOS1ToMILPBridge,
)
return bridge.f
return copy(bridge.f)
end

function MOI.get(::MOI.ModelLike, ::MOI.ConstraintSet, bridge::SOS1ToMILPBridge)
Expand Down
2 changes: 1 addition & 1 deletion src/Bridges/Constraint/bridges/sos2_to_milp.jl
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ function MOI.get(
::MOI.ConstraintFunction,
bridge::SOS2ToMILPBridge,
)
return bridge.f
return copy(bridge.f)
end

function MOI.get(::MOI.ModelLike, ::MOI.ConstraintSet, bridge::SOS2ToMILPBridge)
Expand Down

0 comments on commit 4b3df11

Please sign in to comment.