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,9 +32,9 @@
|
||||
|
||||
#include <algorithm>
|
||||
#include <cmath>
|
||||
#include <memory>
|
||||
|
||||
#include "ceres/cost_function.h"
|
||||
#include "ceres/internal/scoped_ptr.h"
|
||||
#include "ceres/sized_cost_function.h"
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
@@ -67,7 +67,7 @@ class CostFunction2x3 : public SizedCostFunction<2,3> {
|
||||
|
||||
template<int kNumResiduals, int kNumParameters>
|
||||
void TestHelper() {
|
||||
internal::scoped_ptr<CostFunction> cost_function(new CostFunction2x3);
|
||||
std::unique_ptr<CostFunction> cost_function(new CostFunction2x3);
|
||||
typedef TinySolverCostFunctionAdapter<kNumResiduals, kNumParameters> CostFunctionAdapter;
|
||||
CostFunctionAdapter cfa(*cost_function);
|
||||
EXPECT_EQ(CostFunctionAdapter::NUM_RESIDUALS, kNumResiduals);
|
||||
|
||||
Reference in New Issue
Block a user