MCPcopy Create free account
hub / github.com/comaps/comaps / Less

Function Less

generator/final_processor_utils.cpp:12–28  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10using namespace feature;
11
12bool Less(FeatureBuilder const & lhs, FeatureBuilder const & rhs)
13{
14 auto const lGeomType = static_cast<int8_t>(lhs.GetGeomType());
15 auto const rGeomType = static_cast<int8_t>(rhs.GetGeomType());
16
17 // may be empty IDs
18 auto const lId = lhs.GetMostGenericOsmId();
19 auto const rId = rhs.GetMostGenericOsmId();
20
21 auto const lPointsCount = lhs.GetPointsCount();
22 auto const rPointsCount = rhs.GetPointsCount();
23
24 auto const lKeyPoint = lhs.GetKeyPoint();
25 auto const rKeyPoint = rhs.GetKeyPoint();
26
27 return std::tie(lGeomType, lId, lPointsCount, lKeyPoint) < std::tie(rGeomType, rId, rPointsCount, rKeyPoint);
28}
29
30void Order(std::vector<FeatureBuilder> & fbs)
31{

Callers

nothing calls this directly

Calls 4

GetMostGenericOsmIdMethod · 0.80
GetGeomTypeMethod · 0.45
GetPointsCountMethod · 0.45
GetKeyPointMethod · 0.45

Tested by

no test coverage detected