From 8ae054ad91ae402af94f82e4d4ef24957188233b Mon Sep 17 00:00:00 2001 From: Alex Stewart Date: Mon, 7 Feb 2022 14:42:49 +0000 Subject: [PATCH] Fix missing declaration warning in autodiff_manifold_test Change-Id: I33326faaf3f204db5e9e255d87c82d83ec4b710f --- internal/ceres/autodiff_manifold_test.cc | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/internal/ceres/autodiff_manifold_test.cc b/internal/ceres/autodiff_manifold_test.cc index b85d24446..01820c89a 100644 --- a/internal/ceres/autodiff_manifold_test.cc +++ b/internal/ceres/autodiff_manifold_test.cc @@ -40,9 +40,19 @@ namespace ceres { namespace internal { +namespace { + constexpr int kNumTrials = 1000; constexpr double kTolerance = 1e-9; +Vector RandomQuaternion() { + Vector x = Vector::Random(4); + x.normalize(); + return x; +} + +} // namespace + struct EuclideanFunctor { template bool Plus(const T* x, const T* delta, T* x_plus_delta) const { @@ -245,12 +255,6 @@ MATCHER_P2(QuaternionPlusIsCorrectAt, x, delta, "") { return true; } -Vector RandomQuaternion() { - Vector x = Vector::Random(4); - x.normalize(); - return x; -} - TEST(AutoDiffManifoldTest, QuaternionGenericDelta) { AutoDiffManifold manifold; for (int trial = 0; trial < kNumTrials; ++trial) {