diff --git a/geocoder/hierarchy_reader.cpp b/geocoder/hierarchy_reader.cpp index ecc54efd9d..ce9269309e 100644 --- a/geocoder/hierarchy_reader.cpp +++ b/geocoder/hierarchy_reader.cpp @@ -71,6 +71,7 @@ Hierarchy HierarchyReader::Read(unsigned int readersCount) while (!m_eof && tasks.size() <= 2 * readersCount) tasks.emplace_back(threadPool.Submit([&] { return ReadEntries(kReadBlockLineCount); })); + CHECK(!tasks.empty(), ()); auto & task = tasks.front(); auto taskResult = task.get(); tasks.pop_front(); @@ -192,14 +193,16 @@ HierarchyReader::ParsingResult HierarchyReader::DeserializeEntries( entries.push_back(move(entry)); } - return {std::move(entries), std::move(stats)}; + return {move(entries), move(stats)}; } +// static bool HierarchyReader::DeserializeId(string const & str, uint64_t & id) { return strings::to_uint64(str, id, 16 /* base */); } +// static string HierarchyReader::SerializeId(uint64_t id) { stringstream s; diff --git a/geocoder/hierarchy_reader.hpp b/geocoder/hierarchy_reader.hpp index b809961d52..9f1bd8b2b7 100644 --- a/geocoder/hierarchy_reader.hpp +++ b/geocoder/hierarchy_reader.hpp @@ -39,8 +39,8 @@ private: ParsingResult ReadEntries(size_t count); ParsingResult DeserializeEntries(std::vector const & linesBuffer, std::size_t const bufferSize); - bool DeserializeId(std::string const & str, uint64_t & id); - std::string SerializeId(uint64_t id); + static bool DeserializeId(std::string const & str, uint64_t & id); + static std::string SerializeId(uint64_t id); void CheckDuplicateOsmIds(std::vector const & entries, ParsingStats & stats);