[indexer] Clang-format.

This commit is contained in:
tatiana-yan 2020-04-27 14:25:49 +03:00 committed by Maksim Andrianov
parent ed1e8104f8
commit 8e923cf300

View file

@ -8,32 +8,32 @@
namespace indexer
{
bool BuildIndexFromDataFile(std::string const & dataFile, std::string const & tmpFile)
bool BuildIndexFromDataFile(std::string const & dataFile, std::string const & tmpFile)
{
try
{
try
std::string const idxFileName(tmpFile + GEOM_INDEX_TMP_EXT);
{
std::string const idxFileName(tmpFile + GEOM_INDEX_TMP_EXT);
{
FeaturesVectorTest features(dataFile);
FileWriter writer(idxFileName);
FeaturesVectorTest features(dataFile);
FileWriter writer(idxFileName);
BuildIndex(features.GetHeader(), features.GetVector(), writer, tmpFile);
}
FilesContainerW(dataFile, 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;
BuildIndex(features.GetHeader(), features.GetVector(), writer, tmpFile);
}
return true;
FilesContainerW(dataFile, 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