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>2013-09-20 19:09:46 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 02:02:06 +0300
commit6f2ad31c264c8209072df7cfed9e1027d8e3ee34 (patch)
treec5bc54c6931a6c559cb97d8d6e66af7285dda1e1 /indexer/feature_decl.hpp
parentf0122d60b5264645e2679220215c52a8a0083ce0 (diff)
[search] Correct zoom for result and fix balloon point for streets.
Diffstat (limited to 'indexer/feature_decl.hpp')
-rw-r--r--indexer/feature_decl.hpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/indexer/feature_decl.hpp b/indexer/feature_decl.hpp
new file mode 100644
index 0000000000..82b5a9a6e2
--- /dev/null
+++ b/indexer/feature_decl.hpp
@@ -0,0 +1,28 @@
+#pragma once
+
+#include "../std/stdint.hpp"
+
+
+struct FeatureID
+{
+ size_t m_mwm;
+ uint32_t m_offset;
+
+ FeatureID() : m_mwm(-1) {}
+ FeatureID(size_t mwm, uint32_t offset) : m_mwm(mwm), m_offset(offset) {}
+
+ bool IsValid() const { return m_mwm != -1; }
+
+ inline bool operator < (FeatureID const & r) const
+ {
+ if (m_mwm == r.m_mwm)
+ return m_offset < r.m_offset;
+ else
+ return m_mwm < r.m_mwm;
+ }
+
+ inline bool operator == (FeatureID const & r) const
+ {
+ return (m_mwm == r.m_mwm && m_offset == r.m_offset);
+ }
+};