mirror of
https://github.com/ceres-solver/ceres-solver.git
synced 2026-08-30 00:50:37 +08:00
Replace scoped_ptr with C++11's unique_ptr
Change-Id: Ib5a504c491e3a79af52a95accf009df473470c6b
This commit is contained in:
@@ -32,6 +32,7 @@
|
||||
|
||||
#include <algorithm>
|
||||
#include <ctime>
|
||||
#include <memory>
|
||||
#include <set>
|
||||
#include <vector>
|
||||
|
||||
@@ -45,7 +46,6 @@
|
||||
#include "ceres/conjugate_gradients_solver.h"
|
||||
#include "ceres/detect_structure.h"
|
||||
#include "ceres/internal/eigen.h"
|
||||
#include "ceres/internal/scoped_ptr.h"
|
||||
#include "ceres/lapack.h"
|
||||
#include "ceres/linear_solver.h"
|
||||
#include "ceres/sparse_cholesky.h"
|
||||
@@ -325,7 +325,7 @@ LinearSolver::Summary SparseSchurComplementSolver::SolveReducedLinearSystem(
|
||||
return summary;
|
||||
}
|
||||
|
||||
scoped_ptr<CompressedRowSparseMatrix> lhs;
|
||||
std::unique_ptr<CompressedRowSparseMatrix> lhs;
|
||||
const CompressedRowSparseMatrix::StorageType storage_type =
|
||||
sparse_cholesky_->StorageType();
|
||||
if (storage_type == CompressedRowSparseMatrix::UPPER_TRIANGULAR) {
|
||||
@@ -399,9 +399,9 @@ SparseSchurComplementSolver::SolveReducedLinearSystemUsingConjugateGradients(
|
||||
|
||||
VectorRef(solution, num_rows).setZero();
|
||||
|
||||
scoped_ptr<LinearOperator> lhs_adapter(
|
||||
std::unique_ptr<LinearOperator> lhs_adapter(
|
||||
new BlockRandomAccessSparseMatrixAdapter(*sc));
|
||||
scoped_ptr<LinearOperator> preconditioner_adapter(
|
||||
std::unique_ptr<LinearOperator> preconditioner_adapter(
|
||||
new BlockRandomAccessDiagonalMatrixAdapter(*preconditioner_));
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user