| 227 | } |
| 228 | |
| 229 | void ObstacleMap::compress(const NodeID node1, const NodeID delendus, const NodeID node2) |
| 230 | { |
| 231 | auto comp = [this, delendus](const NodeID first, const NodeID last) |
| 232 | { |
| 233 | auto [begin, end] = find_range(last); |
| 234 | for (auto it = begin; it != end; ++it) |
| 235 | { |
| 236 | if (it->from == delendus) |
| 237 | it->from = first; |
| 238 | } |
| 239 | }; |
| 240 | |
| 241 | comp(node1, node2); |
| 242 | comp(node2, node1); |
| 243 | } |
| 244 | |
| 245 | } // namespace osrm::extractor |