| 338 | } // namespace pts |
| 339 | |
| 340 | void Encode(EncodeFunT fn, std::vector<m2::PointD> const & points, GeometryCodingParams const & params, |
| 341 | DeltasT & deltas) |
| 342 | { |
| 343 | size_t const count = points.size(); |
| 344 | |
| 345 | pts::PointsU upoints; |
| 346 | upoints.reserve(count); |
| 347 | |
| 348 | transform(points.begin(), points.end(), std::back_inserter(upoints), |
| 349 | std::bind(&pts::D2U, std::placeholders::_1, params.GetCoordBits())); |
| 350 | |
| 351 | ASSERT(deltas.empty(), ()); |
| 352 | deltas.resize(count); |
| 353 | |
| 354 | coding::OutDeltasT adapt(deltas); |
| 355 | (*fn)(make_read_adapter(upoints), pts::GetBasePoint(params), pts::GetMaxPoint(params), adapt); |
| 356 | } |
| 357 | |
| 358 | void Decode(DecodeFunT fn, DeltasT const & deltas, GeometryCodingParams const & params, OutPointsT & points, |
| 359 | size_t reserveF) |
nothing calls this directly
no test coverage detected