From f33a77234f5418216affe19240494a8efd8841ed Mon Sep 17 00:00:00 2001 From: Peter Mullen Date: Sun, 15 Dec 2019 22:16:01 -0800 Subject: [PATCH] Fix another compiler warning. Change function arguments to const ref --- gtsam/geometry/tests/testPose2.cpp | 6 +++--- gtsam/geometry/tests/testPose3.cpp | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/gtsam/geometry/tests/testPose2.cpp b/gtsam/geometry/tests/testPose2.cpp index fec3fe426..0d53dc4e0 100644 --- a/gtsam/geometry/tests/testPose2.cpp +++ b/gtsam/geometry/tests/testPose2.cpp @@ -880,8 +880,8 @@ namespace transform_covariance3 { // Transform a covariance matrix with a rotation and a translation template static typename TPose::Jacobian RotateTranslate( - std::array r, - std::array t, + const std::array &r, + const std::array &t, const typename TPose::Jacobian &cov) { // Construct a pose object @@ -900,7 +900,7 @@ TEST(Pose2 , TransformCovariance3) { // rotate { - auto cov = GenerateFullCovariance({0.1, 0.3, 0.7}); + auto cov = GenerateFullCovariance({{0.1, 0.3, 0.7}}); auto cov_trans = RotateTranslate({{90.}}, {{}}, cov); // interchange x and y axes EXPECT_DOUBLES_EQUAL(cov_trans(1, 1), cov(0, 0), 1e-9); diff --git a/gtsam/geometry/tests/testPose3.cpp b/gtsam/geometry/tests/testPose3.cpp index 14abe3d8c..f9b388b9b 100644 --- a/gtsam/geometry/tests/testPose3.cpp +++ b/gtsam/geometry/tests/testPose3.cpp @@ -929,8 +929,8 @@ namespace transform_covariance6 { // Transform a covariance matrix with a rotation and a translation template static typename TPose::Jacobian RotateTranslate( - std::array r, - std::array t, + const std::array &r, + const std::array &t, const typename TPose::Jacobian &cov) { // Construct a pose object