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

Function Sort

generator/generator_tests/place_processor_tests.cpp:110–120  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

108using PlaceWithIDs = std::pair<feature::FeatureBuilder, generator::PlaceProcessor::IDsContainerT>;
109
110void Sort(std::vector<PlaceWithIDs> & value)
111{
112 std::sort(value.begin(), value.end(), [](auto const & left, auto const & right)
113 { return left.first.GetMostGenericOsmId() < right.first.GetMostGenericOsmId(); });
114
115 for (auto & [_, ids] : value)
116 {
117 std::sort(ids.begin(), ids.end());
118 ids.erase(std::unique(ids.begin(), ids.end()), ids.end());
119 }
120}
121
122void Test(generator::PlaceProcessor & processor, std::vector<PlaceWithIDs> & expected)
123{

Callers 1

TestFunction · 0.70

Calls 5

uniqueFunction · 0.85
GetMostGenericOsmIdMethod · 0.80
beginMethod · 0.45
endMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected