Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlga Khlopkova <o.khlopkova@corp.mail.ru>2020-07-16 13:52:47 +0300
committerVladimir Byko-Ianko <bykoianko@gmail.com>2020-08-10 14:35:50 +0300
commit4a7b9d7d0c0e7f579df9ea91a8852e02f7db3481 (patch)
tree888ab3341530a6e1d5c7c56a417bef59a19337ce /transit
parentc6b28075e3820a8db1dff4071b0fa135912621f9 (diff)
[transit] Add operator < for ShapeLink.
Diffstat (limited to 'transit')
-rw-r--r--transit/transit_entities.hpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/transit/transit_entities.hpp b/transit/transit_entities.hpp
index 36837458ee..c851a2f3eb 100644
--- a/transit/transit_entities.hpp
+++ b/transit/transit_entities.hpp
@@ -105,6 +105,12 @@ struct ShapeLink
std::tie(rhs.m_shapeId, rhs.m_startIndex, rhs.m_endIndex);
}
+ bool operator<(ShapeLink const & rhs) const
+ {
+ return std::tie(m_shapeId, m_startIndex, m_endIndex) <
+ std::tie(rhs.m_shapeId, rhs.m_startIndex, rhs.m_endIndex);
+ }
+
DECLARE_VISITOR_AND_DEBUG_PRINT(ShapeLink, visitor(m_shapeId, "id"),
visitor(m_startIndex, "startIndex"),
visitor(m_endIndex, "endIndex"))