mirror of
https://github.com/ceres-solver/ceres-solver.git
synced 2026-08-29 16:40:38 +08:00
ClangTidy cleanups
1. NULL -> nullptr 2. foo.reset(new Bar) -> = foo = std::make_unique<Bar>() 3. Missing std library includes & prefixes Change-Id: I260b261b484554be681ee5a7398126fdb3b3a789
This commit is contained in:
@@ -366,8 +366,8 @@ TEST(GradientCheckingProblemImpl,
|
||||
// clang-format on
|
||||
|
||||
GradientCheckingIterationCallback callback;
|
||||
std::unique_ptr<ProblemImpl> gradient_checking_problem_impl(
|
||||
CreateGradientCheckingProblemImpl(&problem_impl, 1.0, 1.0, &callback));
|
||||
std::unique_ptr<ProblemImpl> gradient_checking_problem_impl =
|
||||
CreateGradientCheckingProblemImpl(&problem_impl, 1.0, 1.0, &callback);
|
||||
|
||||
// The dimensions of the two problems match.
|
||||
EXPECT_EQ(problem_impl.NumParameterBlocks(),
|
||||
@@ -444,8 +444,8 @@ TEST(GradientCheckingProblemImpl, ProblemDimensionsMatch) {
|
||||
// clang-format on
|
||||
|
||||
GradientCheckingIterationCallback callback;
|
||||
std::unique_ptr<ProblemImpl> gradient_checking_problem_impl(
|
||||
CreateGradientCheckingProblemImpl(&problem_impl, 1.0, 1.0, &callback));
|
||||
std::unique_ptr<ProblemImpl> gradient_checking_problem_impl =
|
||||
CreateGradientCheckingProblemImpl(&problem_impl, 1.0, 1.0, &callback);
|
||||
|
||||
// The dimensions of the two problems match.
|
||||
EXPECT_EQ(problem_impl.NumParameterBlocks(),
|
||||
@@ -505,8 +505,8 @@ TEST(GradientCheckingProblemImpl, ConstrainedProblemBoundsArePropagated) {
|
||||
problem_impl.SetParameterUpperBound(x, 1, 2.5);
|
||||
|
||||
GradientCheckingIterationCallback callback;
|
||||
std::unique_ptr<ProblemImpl> gradient_checking_problem_impl(
|
||||
CreateGradientCheckingProblemImpl(&problem_impl, 1.0, 1.0, &callback));
|
||||
std::unique_ptr<ProblemImpl> gradient_checking_problem_impl =
|
||||
CreateGradientCheckingProblemImpl(&problem_impl, 1.0, 1.0, &callback);
|
||||
|
||||
// The dimensions of the two problems match.
|
||||
EXPECT_EQ(problem_impl.NumParameterBlocks(),
|
||||
|
||||
Reference in New Issue
Block a user