diff options
author | Maxim Pimenov <m@maps.me> | 2018-04-09 14:27:33 +0300 |
---|---|---|
committer | Roman Kuznetsov <r.kuznetsow@gmail.com> | 2018-04-10 14:31:32 +0300 |
commit | 8651b85289754a09b662e0412b5cae172284c3be (patch) | |
tree | 08d176fad5682b2b54397c3066b5cc553846b4c5 /indexer/cities_boundaries_serdes.hpp | |
parent | 9666660b84740e6bbe0585e59fccd1347c4c793f (diff) |
[coding] [geometry] Deprecated PointToInt.
For some reason we have been using bitwise merge to store
a pair of 32-bit unsigned integer coordinates. Since the
width of the coordinates is fixed and storage in general
has nothing to do with the Z-order curve where bitwise
merge is appropriate, this commit marks this method of
storage as obsolete (and effectively deprecated).
The functions to convert between PointD and PointU are
still serviceable. Their usage is slightly refactored.
Diffstat (limited to 'indexer/cities_boundaries_serdes.hpp')
-rw-r--r-- | indexer/cities_boundaries_serdes.hpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/indexer/cities_boundaries_serdes.hpp b/indexer/cities_boundaries_serdes.hpp index 3346e53761..e42eb6e36a 100644 --- a/indexer/cities_boundaries_serdes.hpp +++ b/indexer/cities_boundaries_serdes.hpp @@ -6,7 +6,7 @@ #include "coding/bit_streams.hpp" #include "coding/elias_coder.hpp" -#include "coding/point_to_integer.hpp" +#include "coding/pointd_to_pointu.hpp" #include "coding/reader.hpp" #include "coding/varint.hpp" #include "coding/write_to_sink.hpp" @@ -119,7 +119,10 @@ public: } private: - m2::PointU ToU(m2::PointD const & p) const { return PointD2PointU(p, m_params.GetCoordBits()); } + m2::PointU ToU(m2::PointD const & p) const + { + return PointDToPointU(p, m_params.GetCoordBits()); + } std::vector<m2::PointU> ToU(std::vector<m2::PointD> const & ps) const { @@ -264,7 +267,7 @@ public: private: m2::PointD FromU(m2::PointU const & u) const { - return PointU2PointD(u, m_params.GetCoordBits()); + return PointUToPointD(u, m_params.GetCoordBits()); } std::vector<m2::PointD> FromU(std::vector<m2::PointU> const & us) const |