From b2581b0d5843441256d5364b98ac96cdf5c8d67f Mon Sep 17 00:00:00 2001 From: gaschler Date: Tue, 13 Feb 2018 13:03:26 +0100 Subject: [PATCH] Make comparison operator const. (#898) --- cartographer/mapping_3d/hybrid_grid_test.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cartographer/mapping_3d/hybrid_grid_test.cc b/cartographer/mapping_3d/hybrid_grid_test.cc index 263fb37..3cec073 100644 --- a/cartographer/mapping_3d/hybrid_grid_test.cc +++ b/cartographer/mapping_3d/hybrid_grid_test.cc @@ -208,7 +208,8 @@ TEST_F(RandomHybridGridTest, ToProto) { } struct EigenComparator { - bool operator()(const Eigen::Vector3i& lhs, const Eigen::Vector3i& rhs) { + bool operator()(const Eigen::Vector3i& lhs, + const Eigen::Vector3i& rhs) const { return std::forward_as_tuple(lhs.x(), lhs.y(), lhs.z()) < std::forward_as_tuple(rhs.x(), rhs.y(), rhs.z()); }