diff --git a/indexer/feature.cpp b/indexer/feature.cpp index ce890fa570..000cabb778 100644 --- a/indexer/feature.cpp +++ b/indexer/feature.cpp @@ -181,6 +181,15 @@ void FeatureType::Deserialize(feature::LoaderBase * pLoader, TBuffer buffer) m_innerStats.MakeZero(); } +void FeatureType::ParseEverything() const +{ + // Also calls ParseCommon() and ParseTypes(). + ParseHeader2(); + ParseGeometry(FeatureType::BEST_GEOMETRY); + ParseTriangles(FeatureType::BEST_GEOMETRY); + ParseMetadata(); +} + void FeatureType::ParseHeader2() const { if (!m_bHeader2Parsed) diff --git a/indexer/feature.hpp b/indexer/feature.hpp index 5e5a479582..f475b752da 100644 --- a/indexer/feature.hpp +++ b/indexer/feature.hpp @@ -170,6 +170,8 @@ public: /// @name Parse functions. Do simple dispatching to m_pLoader. //@{ + /// Super-method to call all possible Parse* methods. + void ParseEverything() const; void ParseHeader2() const; void ResetGeometry() const; diff --git a/map/framework.cpp b/map/framework.cpp index 42f247c981..dfb72a393b 100644 --- a/map/framework.cpp +++ b/map/framework.cpp @@ -1662,11 +1662,7 @@ FeatureType Framework::GetPOIByID(FeatureID const & fid) const // Note: all parse methods should be called with guard alive. Index::FeaturesLoaderGuard guard(m_model.GetIndex(), fid.m_mwmId); guard.GetFeatureByIndex(fid.m_index, feature); - feature.ParseHeader2(); - feature.ParseGeometry(FeatureType::BEST_GEOMETRY); - feature.ParseTriangles(FeatureType::BEST_GEOMETRY); - feature.ParseMetadata(); - + feature.ParseEverything(); return feature; }