| 460 | } |
| 461 | |
| 462 | void Processor::EmitWithMetadata(feature::Metadata::EType type) |
| 463 | { |
| 464 | std::vector<std::shared_ptr<MwmInfo>> infos; |
| 465 | m_dataSource.GetMwmsInfo(infos); |
| 466 | // less<MwmInfo*> |
| 467 | std::sort(infos.begin(), infos.end()); |
| 468 | |
| 469 | std::vector<FeatureID> ids; |
| 470 | m_dataSource.ForEachFeatureIDInRect([&ids](FeatureID id) { ids.push_back(std::move(id)); }, m_viewport, |
| 471 | scales::GetUpperScale()); |
| 472 | |
| 473 | // The same, first criteria is less<MwmId> -> less<MwmInfo*> |
| 474 | std::sort(ids.begin(), ids.end()); |
| 475 | |
| 476 | size_t idx = 0; |
| 477 | EmitResultsFromMwms(infos, [type, &idx, &ids](FeaturesLoaderGuard & guard, auto const & fn) |
| 478 | { |
| 479 | for (; idx < ids.size() && ids[idx].m_mwmId == guard.GetId(); ++idx) |
| 480 | { |
| 481 | auto ft = guard.GetFeatureByIndex(ids[idx].m_index); |
| 482 | if (ft) |
| 483 | { |
| 484 | if (ft->HasMetadata(type)) |
| 485 | fn(std::move(ft)); |
| 486 | } |
| 487 | } |
| 488 | }); |
| 489 | } |
| 490 | |
| 491 | Locales Processor::GetCategoryLocales() const |
| 492 | { |
nothing calls this directly
no test coverage detected