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

Function UpdateShapeInfos

libs/drape_frontend/transit_scheme_builder.cpp:832–848  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

830}
831
832void UpdateShapeInfos(std::vector<ShapeInfoPT> & shapeInfos, m2::PointD const & newDir,
833 std::set<std::string> const & colors)
834{
835 auto const newDirReverse = -newDir;
836
837 for (ShapeInfoPT & info : shapeInfos)
838 {
839 if (AlmostEqualAbs(info.m_direction, newDir, kEps) || AlmostEqualAbs(info.m_direction, newDirReverse, kEps))
840 {
841 for (auto const & color : colors)
842 info.m_colors.insert(color);
843 return;
844 }
845 }
846
847 shapeInfos.push_back(ShapeInfoPT(newDir, colors));
848}
849
850void UpdateShapeInfos(std::vector<ShapeInfoPT> & shapeInfos, m2::PointD const & newDir, std::string const & color)
851{

Callers 1

PrepareSchemePTMethod · 0.85

Calls 4

ShapeInfoPTClass · 0.85
AlmostEqualAbsFunction · 0.50
insertMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected