More clang-tidy and wjr@ comment fixes Change-Id: I5736ae482f736fc56c00d21c659b1f8d41da68e9
diff --git a/internal/ceres/autodiff_benchmarks/autodiff_benchmarks.cc b/internal/ceres/autodiff_benchmarks/autodiff_benchmarks.cc index 3d1699b..2ab1598 100644 --- a/internal/ceres/autodiff_benchmarks/autodiff_benchmarks.cc +++ b/internal/ceres/autodiff_benchmarks/autodiff_benchmarks.cc
@@ -41,7 +41,6 @@ #include "ceres/ceres.h" namespace ceres { - namespace internal { // If we want to use functors with both operator() and an Evaluate() method @@ -54,7 +53,7 @@ template <typename CostFunction> struct CostFunctionToFunctor { template <typename... _Args> - CostFunctionToFunctor(_Args&&... __args) + explicit CostFunctionToFunctor(_Args&&... __args) : cost_function(std::forward<_Args>(__args)...) {} template <typename... _Args> @@ -64,7 +63,8 @@ CostFunction cost_function; }; -} + +} // namespace internal template <int kParameterBlockSize> static void BM_ConstantAnalytic(benchmark::State& state) {
diff --git a/internal/ceres/problem_test.cc b/internal/ceres/problem_test.cc index f2b5da5..9093b7a 100644 --- a/internal/ceres/problem_test.cc +++ b/internal/ceres/problem_test.cc
@@ -2123,16 +2123,12 @@ EXPECT_EQ(problem.ParameterBlockSize(x), 3); } -TEST(Solver, ZeroSizedLocalParameterizationHoldsParameterBlockConstant) { +TEST(Solver, ZeroSizedLocalParameterizationMeansParameterBlockIsConstant) { double x = 0.0; double y = 1.0; Problem problem; problem.AddResidualBlock(new BinaryCostFunction(1, 1, 1), nullptr, &x, &y); problem.SetParameterization(&y, new SubsetParameterization(1, {0})); - // Zero dimensional tangent space means that the block is - // effectively constant, but because the user did not mark it - // constant explicitly, the user will not see it as constant when - // querying IsParameterBlockConstant. EXPECT_TRUE(problem.IsParameterBlockConstant(&y)); }