MCPcopy Create free account
hub / github.com/OpenOrienteering/mapper / findNextDashPoint

Method findNextDashPoint

src/core/virtual_path.cpp:136–157  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

134}
135
136PathCoordVector::size_type PathCoordVector::findNextDashPoint(PathCoordVector::size_type first) const
137{
138 // Get behind the current point
139 auto prev_index = (*this)[first].index;
140 auto last = size() - 1;
141
142 while (first != last && (*this)[first].index == prev_index)
143 {
144 ++first;
145 }
146
147 // Find a dash point or hole point
148 while (first != last)
149 {
150 const auto& current_flags = virtual_coords.flags[(*this)[first].index];
151 if (current_flags.isDashPoint() || current_flags.isHolePoint())
152 break;
153 ++first;
154 }
155
156 return first;
157}
158
159PathCoord::length_type PathCoordVector::length() const
160{

Callers 2

processDashedLineMethod · 0.80

Calls 2

isDashPointMethod · 0.80
isHolePointMethod · 0.80

Tested by

no test coverage detected