| 130 | } |
| 131 | |
| 132 | void EncodePolylinePrev2(InPointsT const & points, m2::PointU const & basePoint, m2::PointU const & maxPoint, |
| 133 | OutDeltasT & deltas) |
| 134 | { |
| 135 | size_t const count = points.size(); |
| 136 | if (count > 0) |
| 137 | { |
| 138 | deltas.push_back(EncodePointDeltaAsUint(points[0], basePoint)); |
| 139 | if (count > 1) |
| 140 | { |
| 141 | m2::PointD const maxPointD(maxPoint); |
| 142 | deltas.push_back(EncodePointDeltaAsUint(points[1], points[0])); |
| 143 | for (size_t i = 2; i < count; ++i) |
| 144 | deltas.push_back( |
| 145 | EncodePointDeltaAsUint(points[i], PredictPointInPolyline(maxPointD, points[i - 1], points[i - 2]))); |
| 146 | } |
| 147 | } |
| 148 | |
| 149 | ASSERT(TestDecoding(points, basePoint, maxPoint, deltas, &DecodePolylinePrev2), ()); |
| 150 | } |
| 151 | |
| 152 | void DecodePolylinePrev2(InDeltasT const & deltas, m2::PointU const & basePoint, m2::PointU const & maxPoint, |
| 153 | OutPointsT & points) |
no test coverage detected