Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Pimenov <m@maps.me>2018-04-09 20:40:11 +0300
committerRoman Kuznetsov <r.kuznetsow@gmail.com>2018-04-11 14:27:47 +0300
commit0dc0baa25593b462517e0a8e603154dcd917cdc5 (patch)
tree93452601558bbb6260e55962ba5360ebda8699ee /transit/transit_serdes.hpp
parentb333719087bbe70c2e3d6ec03151b131670e2d26 (diff)
[coding] [geometry] Refactored geometry serialization.
This commit moves all the code related to geometry serialization from indexer/ and coding/ to a single place, namely coding/geometry_coding.{c,h}pp.
Diffstat (limited to 'transit/transit_serdes.hpp')
-rw-r--r--transit/transit_serdes.hpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/transit/transit_serdes.hpp b/transit/transit_serdes.hpp
index 45d54f9d00..38e1e34e72 100644
--- a/transit/transit_serdes.hpp
+++ b/transit/transit_serdes.hpp
@@ -2,10 +2,9 @@
#include "transit/transit_types.hpp"
-#include "indexer/geometry_coding.hpp"
-
#include "geometry/point2d.hpp"
+#include "coding/geometry_coding.hpp"
#include "coding/point_to_integer.hpp"
#include "coding/pointd_to_pointu.hpp"
#include "coding/read_write_utils.hpp"
@@ -92,7 +91,7 @@ public:
for (auto const & p : vs)
{
m2::PointU const pointU = PointDToPointU(p, POINT_COORD_BITS);
- WriteVarUint(m_sink, EncodeDelta(pointU, lastEncodedPoint));
+ WriteVarUint(m_sink, coding::EncodeDelta(pointU, lastEncodedPoint));
lastEncodedPoint = pointU;
}
}
@@ -290,7 +289,7 @@ public:
vs.resize(size);
for (auto & p : vs)
{
- m2::PointU const pointU = DecodeDelta(ReadVarUint<uint64_t, Source>(m_source), lastDecodedPoint);
+ m2::PointU const pointU = coding::DecodeDelta(ReadVarUint<uint64_t, Source>(m_source), lastDecodedPoint);
p = PointUToPointD(pointU, POINT_COORD_BITS);
lastDecodedPoint = pointU;
}