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:
authorvng <viktor.govako@gmail.com>2011-08-23 18:49:31 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 01:22:20 +0300
commitb9df96e89b57666178aada45c4c25eece8f8d756 (patch)
tree3c92c630bbe427e6bda7f91b2567ff4534810c6b /indexer/coding_params.cpp
parent2046a47d565e7f3c9a1a18eaec7d969f9bf20789 (diff)
Factor out 'CodingParams' to separate module.
Diffstat (limited to 'indexer/coding_params.cpp')
-rw-r--r--indexer/coding_params.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/indexer/coding_params.cpp b/indexer/coding_params.cpp
new file mode 100644
index 0000000000..05cd0ea077
--- /dev/null
+++ b/indexer/coding_params.cpp
@@ -0,0 +1,27 @@
+#include "coding_params.hpp"
+#include "point_to_int64.hpp"
+
+#include "../geometry/pointu_to_uint64.hpp"
+
+
+namespace serial
+{
+ CodingParams::CodingParams()
+ : m_BasePointUint64(0), m_CoordBits(30)
+ {
+ m_BasePoint = m2::Uint64ToPointU(m_BasePointUint64);
+ }
+
+ CodingParams::CodingParams(uint8_t coordBits, m2::PointD const & pt)
+ : m_CoordBits(coordBits)
+ {
+ m_BasePoint = PointD2PointU(pt.x, pt.y, coordBits);
+ m_BasePointUint64 = m2::PointUToUint64(m_BasePoint);
+ }
+
+ CodingParams::CodingParams(uint8_t coordBits, uint64_t basePointUint64)
+ : m_BasePointUint64(basePointUint64), m_CoordBits(coordBits)
+ {
+ m_BasePoint = m2::Uint64ToPointU(m_BasePointUint64);
+ }
+}