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-05-18 02:52:04 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 01:17:26 +0300
commitdf47837ca01def87882e218a4a6681f040c08769 (patch)
treedc650d819c8686a37173ea1d8c29de8ddc720eca /indexer/feature_data.hpp
parentae3a56718141e48107a0921399af2d342d4cff69 (diff)
- Fix FeatureType::GetRank() - don't return rank for countries;
- Fix feature types routine - hold linear and area types for one feature; - Skip all small features during World.mwm generation;
Diffstat (limited to 'indexer/feature_data.hpp')
-rw-r--r--indexer/feature_data.hpp23
1 files changed, 13 insertions, 10 deletions
diff --git a/indexer/feature_data.hpp b/indexer/feature_data.hpp
index 0da703823f..27fadeba65 100644
--- a/indexer/feature_data.hpp
+++ b/indexer/feature_data.hpp
@@ -113,26 +113,29 @@ struct FeatureParamsBase
class FeatureParams : public FeatureParamsBase
{
- feature::EGeomType m_Geom;
+ bool m_geomTypes[3];
public:
typedef vector<uint32_t> types_t;
types_t m_Types;
FeatureParams(FeatureParamsBase const & rhs)
- : FeatureParamsBase(rhs), m_Geom(feature::GEOM_UNDEFINED)
+ : FeatureParamsBase(rhs)
{
+ m_geomTypes[0] = m_geomTypes[1] = m_geomTypes[2] = false;
+ }
+ FeatureParams()
+ {
+ m_geomTypes[0] = m_geomTypes[1] = m_geomTypes[2] = false;
}
- FeatureParams() : m_Geom(feature::GEOM_UNDEFINED) {}
bool IsValid() const { return !m_Types.empty(); }
- inline void SetGeomType(feature::EGeomType t) { m_Geom = t; }
- inline void RemoveGeomType(feature::EGeomType t)
- {
- if (m_Geom == t) m_Geom = feature::GEOM_UNDEFINED;
- }
- inline feature::EGeomType GetGeomType() const { return m_Geom; }
+ inline void SetGeomType(feature::EGeomType t) { m_geomTypes[t] = true; }
+ inline void RemoveGeomType(feature::EGeomType t) { m_geomTypes[t] = false; }
+
+ feature::EGeomType GetGeomType() const;
+ uint8_t GetTypeMask() const;
inline void AddType(uint32_t t) { m_Types.push_back(t); }
void AddTypes(FeatureParams const & rhs);
@@ -164,6 +167,6 @@ public:
for (size_t i = 0; i < m_Types.size(); ++i)
WriteVarUint(sink, m_Types[i]);
- FeatureParamsBase::Write(sink, header, m_Geom);
+ FeatureParamsBase::Write(sink, header, GetGeomType());
}
};