Fix build breakage on old versions of SuiteSparse. Change-Id: I2a061615fc374abef2ed323c298359002a6fc5f1
diff --git a/internal/ceres/covariance_impl.cc b/internal/ceres/covariance_impl.cc index faa0ce5..75c80bf 100644 --- a/internal/ceres/covariance_impl.cc +++ b/internal/ceres/covariance_impl.cc
@@ -441,23 +441,23 @@ cholmod_jacobian_view.sorted = 1; cholmod_jacobian_view.packed = 1; - string status; - cholmod_factor* factor = ss.AnalyzeCholesky(&cholmod_jacobian_view, &status); + string message; + cholmod_factor* factor = ss.AnalyzeCholesky(&cholmod_jacobian_view, &message); event_logger.AddEvent("Symbolic Factorization"); if (factor == NULL) { LOG(ERROR) << "Covariance estimation failed. " << "CHOLMOD symbolic cholesky factorization returned with: " - << status; + << message; return false; } LinearSolverTerminationType termination_type = - ss.Cholesky(&cholmod_jacobian_view, factor, &status); + ss.Cholesky(&cholmod_jacobian_view, factor, &message); event_logger.AddEvent("Numeric Factorization"); if (termination_type != LINEAR_SOLVER_SUCCESS) { LOG(ERROR) << "Covariance estimation failed. " << "CHOLMOD numeric cholesky factorization returned with: " - << status; + << message; ss.Free(factor); return false; } @@ -506,7 +506,7 @@ } rhs_x[r] = 1.0; - cholmod_dense* solution = ss.Solve(factor, rhs); + cholmod_dense* solution = ss.Solve(factor, rhs, &message); double* solution_x = reinterpret_cast<double*>(solution->x); for (int idx = row_begin; idx < row_end; ++idx) { const int c = cols[idx];