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

Method SetSales

libs/map/search_mark.cpp:550–562  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

548}
549
550void SearchMarks::SetSales(std::vector<FeatureID> const & features, bool hasSale)
551{
552 if (features.empty())
553 return;
554
555 ProcessMarks([&features, hasSale](SearchMarkPoint * mark) -> base::ControlFlow
556 {
557 ASSERT(std::is_sorted(features.cbegin(), features.cend()), ());
558 if (std::binary_search(features.cbegin(), features.cend(), mark->GetFeatureID()))
559 mark->SetSale(hasSale);
560 return base::ControlFlow::Continue;
561 });
562}
563
564bool SearchMarks::IsThereSearchMarkForFeature(FeatureID const & featureId) const
565{

Callers

nothing calls this directly

Calls 6

ASSERTFunction · 0.85
SetSaleMethod · 0.80
emptyMethod · 0.45
cbeginMethod · 0.45
cendMethod · 0.45
GetFeatureIDMethod · 0.45

Tested by

no test coverage detected