| 193 | |
| 194 | template <typename InputIterator, typename OutputIterator> |
| 195 | void CopyWithoutOffsets(InputIterator start, InputIterator stop, OutputIterator out, uint32_t positiveOffset, |
| 196 | uint32_t negativeOffset, bool keepEnds) |
| 197 | { |
| 198 | auto from = start; |
| 199 | auto to = stop; |
| 200 | |
| 201 | if (distance(start, stop) > 1) |
| 202 | { |
| 203 | from = CutOffset(start, stop, positiveOffset, keepEnds); |
| 204 | // |to| points past the last edge we need to take. |
| 205 | to = CutOffset(reverse_iterator<InputIterator>(stop), reverse_iterator<InputIterator>(start), negativeOffset, |
| 206 | keepEnds) |
| 207 | .base(); |
| 208 | } |
| 209 | |
| 210 | if (!keepEnds) |
| 211 | CHECK(from <= to, ("From iterator is less or equal than to.")); |
| 212 | |
| 213 | if (from >= to) |
| 214 | return; |
| 215 | |
| 216 | copy(from, to, out); |
| 217 | } |
| 218 | |
| 219 | class SegmentsDecoderV2 |
| 220 | { |
no test coverage detected