Replace scoped_ptr with C++11's unique_ptr

Change-Id: Ib5a504c491e3a79af52a95accf009df473470c6b
This commit is contained in:
Keir Mierle
2018-03-30 16:16:59 -07:00
parent fc9336e12a
commit 7c4e8a454e
120 changed files with 427 additions and 728 deletions
+4 -4
View File
@@ -31,9 +31,9 @@
#ifndef CERES_PUBLIC_GRADIENT_PROBLEM_H_
#define CERES_PUBLIC_GRADIENT_PROBLEM_H_
#include <memory>
#include "ceres/internal/macros.h"
#include "ceres/internal/port.h"
#include "ceres/internal/scoped_ptr.h"
#include "ceres/local_parameterization.h"
namespace ceres {
@@ -105,9 +105,9 @@ class CERES_EXPORT GradientProblem {
bool Plus(const double* x, const double* delta, double* x_plus_delta) const;
private:
internal::scoped_ptr<FirstOrderFunction> function_;
internal::scoped_ptr<LocalParameterization> parameterization_;
internal::scoped_array<double> scratch_;
std::unique_ptr<FirstOrderFunction> function_;
std::unique_ptr<LocalParameterization> parameterization_;
std::unique_ptr<double[]> scratch_;
};
// A FirstOrderFunction object implements the evaluation of a function