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

Function ParsePointsStr

qt/screenshoter.cpp:74–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72}
73
74bool ParsePointsStr(std::string const & pointsStr, std::list<std::pair<m2::PointD, int>> & points)
75{
76 strings::SimpleTokenizer tupleIter(pointsStr, ";");
77 m2::PointD pt;
78 uint8_t zoom;
79 while (tupleIter)
80 {
81 if (ParsePoint(*tupleIter, ", \t", pt, zoom))
82 {
83 points.emplace_back(pt, zoom);
84 }
85 else
86 {
87 LOG(LWARNING, ("Failed to parse point and zoom:", *tupleIter));
88 return false;
89 }
90 ++tupleIter;
91 }
92 return true;
93}
94
95bool ParseRectsStr(std::string const & rectsStr, std::list<m2::RectD> & rects)
96{

Callers 1

LoadPointsMethod · 0.85

Calls 2

ParsePointFunction · 0.70
emplace_backMethod · 0.45

Tested by

no test coverage detected