Skip to content

Commit

Permalink
Remove unreachable code branch (#300)
Browse files Browse the repository at this point in the history
We build OptimizerCache{T} in MOI.optimize!, so we cannot have a
different T here.
  • Loading branch information
odow authored Nov 25, 2024
1 parent 69de84d commit 264f39f
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/MOI_wrapper/MOI_wrapper.jl
Original file line number Diff line number Diff line change
Expand Up @@ -260,13 +260,7 @@ function MOI.optimize!(
src::MOI.Utilities.UniversalFallback{OptimizerCache{T}},
) where {T}
linear_solver = get(dest.options, :linear_solver, DirectSolver)
if T != scsint_t(linear_solver)
cache = MOI.Utilities.UniversalFallback(
OptimizerCache{scsint_t(linear_solver)}(),
)
MOI.copy_to(cache, src)
return MOI.optimize!(dest, cache)
end
@assert T == scsint_t(linear_solver)
# The real stuff starts here.
MOI.empty!(dest)
index_map = MOI.Utilities.identity_index_map(src)
Expand Down

0 comments on commit 264f39f

Please sign in to comment.