diff --git a/generator/osm_source.cpp b/generator/osm_source.cpp index 6a76031595..ab35f0f7e6 100644 --- a/generator/osm_source.cpp +++ b/generator/osm_source.cpp @@ -123,7 +123,10 @@ void ProcessOsmElementsFromXML(SourceReader & stream, function(m_chunkSize); + translators.Emit(elements); + + for (auto & e : elements) + e.Clear(); + element_pos = 0; } elements.resize(element_pos); diff --git a/generator/translators_pool.cpp b/generator/translators_pool.cpp index 137e4381db..fa9ec7b195 100644 --- a/generator/translators_pool.cpp +++ b/generator/translators_pool.cpp @@ -15,7 +15,7 @@ TranslatorsPool::TranslatorsPool(std::shared_ptr const & or m_translators.Push(original->Clone()); } -void TranslatorsPool::Emit(std::vector && elements) +void TranslatorsPool::Emit(std::vector elements) { std::shared_ptr translator; m_translators.WaitAndPop(translator); diff --git a/generator/translators_pool.hpp b/generator/translators_pool.hpp index f2e973cd24..d2c4c73f2c 100644 --- a/generator/translators_pool.hpp +++ b/generator/translators_pool.hpp @@ -18,7 +18,7 @@ public: explicit TranslatorsPool(std::shared_ptr const & original, size_t threadCount); - void Emit(std::vector && elements); + void Emit(std::vector elements); bool Finish(); private: