| 25 | } |
| 26 | |
| 27 | traffic::SpeedGroup TrafficStash::GetSpeedGroup(Segment const & segment) const |
| 28 | { |
| 29 | auto itMwm = m_mwmToTraffic.find(segment.GetMwmId()); |
| 30 | if (itMwm == m_mwmToTraffic.cend()) |
| 31 | return traffic::SpeedGroup::Unknown; |
| 32 | |
| 33 | auto const & coloring = itMwm->second; |
| 34 | auto const itSeg = coloring->find(traffic::TrafficInfo::RoadSegmentId( |
| 35 | segment.GetFeatureId(), base::asserted_cast<uint16_t>(segment.GetSegmentIdx()), |
| 36 | segment.IsForward() ? traffic::TrafficInfo::RoadSegmentId::kForwardDirection |
| 37 | : traffic::TrafficInfo::RoadSegmentId::kReverseDirection)); |
| 38 | |
| 39 | if (itSeg == coloring->cend()) |
| 40 | return traffic::SpeedGroup::Unknown; |
| 41 | |
| 42 | return itSeg->second; |
| 43 | } |
| 44 | |
| 45 | void TrafficStash::SetColoring(NumMwmId numMwmId, shared_ptr<traffic::TrafficInfo::Coloring const> coloring) |
| 46 | { |
no test coverage detected