Commit af240ac6 authored by davidkep's avatar davidkep

reset metrics pointer after moving

parent def8afad
...@@ -438,7 +438,8 @@ class MMOptimizer : public Optimizer<LossFunction, PenaltyFunction, Coefficients ...@@ -438,7 +438,8 @@ class MMOptimizer : public Optimizer<LossFunction, PenaltyFunction, Coefficients
// Compute the minimizer of the convex surrogates. // Compute the minimizer of the convex surrogates.
auto optimum = optimizer_.Optimize(); auto optimum = optimizer_.Optimize();
if (optimum.metrics) { if (optimum.metrics) {
metrics->AddSubMetrics(*optimum.metrics); metrics->AddSubMetrics(std::move(*optimum.metrics));
optimum.metrics.reset();
} }
// Check for any problems. // Check for any problems.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment