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:
authorYuri Gorshenin <y@maps.me>2015-04-27 16:42:27 +0300
committerAlex Zolotarev <alex@maps.me>2015-09-23 02:47:19 +0300
commitebcbdafa351cc333f958dac2bedd3876d399f95c (patch)
tree70f33e09821fbb12c3fa0970220cc133ec5e8dd0 /indexer/feature_decl.hpp
parent4687d0dd3da2dc7328e52115f1d315c869967260 (diff)
Implemented new mwm info table.
Diffstat (limited to 'indexer/feature_decl.hpp')
-rw-r--r--indexer/feature_decl.hpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/indexer/feature_decl.hpp b/indexer/feature_decl.hpp
index af8fdd57e1..b847d374a7 100644
--- a/indexer/feature_decl.hpp
+++ b/indexer/feature_decl.hpp
@@ -1,9 +1,10 @@
#pragma once
+#include "indexer/mwm_set.hpp"
+
#include "std/stdint.hpp"
#include "std/string.hpp"
-
namespace feature
{
@@ -20,25 +21,25 @@ enum EGeomType
struct FeatureID
{
- size_t m_mwm;
+ MwmSet::MwmId m_mwmId;
uint32_t m_offset;
- FeatureID() : m_mwm(-1) {}
- FeatureID(size_t mwm, uint32_t offset) : m_mwm(mwm), m_offset(offset) {}
+ FeatureID() = default;
+ FeatureID(MwmSet::MwmId const & mwmId, uint32_t offset) : m_mwmId(mwmId), m_offset(offset) {}
- bool IsValid() const { return m_mwm != -1; }
+ bool IsValid() const { return m_mwmId.IsAlive(); }
inline bool operator < (FeatureID const & r) const
{
- if (m_mwm == r.m_mwm)
+ if (m_mwmId == r.m_mwmId)
return m_offset < r.m_offset;
else
- return m_mwm < r.m_mwm;
+ return m_mwmId < r.m_mwmId;
}
inline bool operator == (FeatureID const & r) const
{
- return (m_mwm == r.m_mwm && m_offset == r.m_offset);
+ return m_mwmId == r.m_mwmId && m_offset == r.m_offset;
}
inline bool operator != (FeatureID const & r) const