diff --git a/indexer/classificator.cpp b/indexer/classificator.cpp index 17169eb220..a46e049f50 100644 --- a/indexer/classificator.cpp +++ b/indexer/classificator.cpp @@ -508,3 +508,8 @@ void Classificator::ReadTypesMapping(string const & buffer) m_i2t.Load(buffer); m_t2i.Load(buffer); } + +void Classificator::Clear() +{ + *this = Classificator(); +} diff --git a/indexer/classificator.hpp b/indexer/classificator.hpp index 8d22c5eb50..37b69b6a79 100644 --- a/indexer/classificator.hpp +++ b/indexer/classificator.hpp @@ -221,6 +221,8 @@ public: void SortClassificator(); //@} + void Clear(); + /// Return type by path in classificator tree, example: /// path = ["natural", "caostline"]. uint32_t GetTypeByPath(vector const & path) const; diff --git a/indexer/classificator_loader.cpp b/indexer/classificator_loader.cpp index 4bdf650a2d..8160695d09 100644 --- a/indexer/classificator_loader.cpp +++ b/indexer/classificator_loader.cpp @@ -22,6 +22,7 @@ namespace classificator string buffer; Classificator & c = classif(); + c.Clear(); // LOG(LINFO, ("Reading classificator")); classificator.ReadAsString(buffer);