| 142 | } |
| 143 | |
| 144 | ankerl::unordered_dense::map<base::GeoObjectId, FeatureBuilder> ComplexFinalProcessor::RemoveRelationBuildingParts( |
| 145 | std::vector<FeatureBuilder> & fbs) |
| 146 | { |
| 147 | CHECK(m_buildingToParts, ()); |
| 148 | |
| 149 | auto it = std::partition(std::begin(fbs), std::end(fbs), [&](auto const & fb) |
| 150 | { return !m_buildingToParts->HasBuildingPart(fb.GetMostGenericOsmId()); }); |
| 151 | |
| 152 | ankerl::unordered_dense::map<base::GeoObjectId, FeatureBuilder> buildingParts; |
| 153 | buildingParts.reserve(static_cast<size_t>(std::distance(it, std::end(fbs)))); |
| 154 | |
| 155 | std::transform(it, std::end(fbs), std::inserter(buildingParts, std::begin(buildingParts)), [](auto && fb) |
| 156 | { |
| 157 | auto const id = fb.GetMostGenericOsmId(); |
| 158 | return std::make_pair(id, std::move(fb)); |
| 159 | }); |
| 160 | |
| 161 | fbs.resize(static_cast<size_t>(std::distance(std::begin(fbs), it))); |
| 162 | return buildingParts; |
| 163 | } |
| 164 | |
| 165 | void ComplexFinalProcessor::WriteLines(std::vector<HierarchyEntry> const & lines) |
| 166 | { |
nothing calls this directly
no test coverage detected