aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2018-07-19 18:48:19 +0200
committerGravatar Gael Guennebaud <g.gael@free.fr>2018-07-19 18:48:19 +0200
commit2424e3b7aca514783fea4026775068827b8ee915 (patch)
tree58c041fc5a3cdaeda7605ee3148abd12273722a5 /test
parent509a5fa77f1e2241123a0f22a2ea75a0e9267251 (diff)
Pass by const ref.
Diffstat (limited to 'test')
-rw-r--r--test/AnnoyingScalar.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/AnnoyingScalar.h b/test/AnnoyingScalar.h
index b5b1476fe..7d1df2253 100644
--- a/test/AnnoyingScalar.h
+++ b/test/AnnoyingScalar.h
@@ -139,13 +139,13 @@ namespace internal {
AnnoyingScalar get_test_precision(const AnnoyingScalar&)
{ return Eigen::test_precision<AnnoyingScalar>(); }
-AnnoyingScalar test_relative_error(AnnoyingScalar a, AnnoyingScalar b)
+AnnoyingScalar test_relative_error(const AnnoyingScalar &a, const AnnoyingScalar &b)
{ return test_relative_error(*a.v, *b.v); }
-inline bool test_isApprox(AnnoyingScalar a, AnnoyingScalar b)
+inline bool test_isApprox(const AnnoyingScalar &a, const AnnoyingScalar &b)
{ return internal::isApprox(*a.v, *b.v, test_precision<float>()); }
-inline bool test_isMuchSmallerThan(AnnoyingScalar a, AnnoyingScalar b)
+inline bool test_isMuchSmallerThan(const AnnoyingScalar &a, const AnnoyingScalar &b)
{ return test_isMuchSmallerThan(*a.v, *b.v); }
#endif // EIGEN_TEST_ANNOYING_SCALAR_H