/
githubmirror
/
omim
Обзор
Документация
Войти
/
githubmirror
/
omim
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
android-95
indexer/index_builder.cpp
39 строк
967 B
Maxim Pimenov
Got rid of the old style std/ includes for several files, mostly in map/ and platform/.
23 сен 2019, 13:25
23 сен 2019, 13:25
bfc0b02
Код
Авторство
О чём код?
#include "indexer/index_builder.hpp" #include "indexer/features_vector.hpp" #include "base/logging.hpp" #include "defines.hpp" namespace indexer { bool BuildIndexFromDataFile(std::string const & datFile, std::string const & tmpFile) { try { std::string const idxFileName(tmpFile + GEOM_INDEX_TMP_EXT); { FeaturesVectorTest features(datFile); FileWriter writer(idxFileName); BuildIndex(features.GetHeader(), features.GetVector(), writer, tmpFile); } FilesContainerW(datFile, FileWriter::OP_WRITE_EXISTING).Write(idxFileName, INDEX_FILE_TAG); FileWriter::DeleteFileX(idxFileName); } catch (Reader::Exception const & e) { LOG(LERROR, ("Error while reading file: ", e.Msg())); return false; } catch (Writer::Exception const & e) { LOG(LERROR, ("Error writing index file: ", e.Msg())); return false; } return true; } } // namespace indexer