From 5418b0244417ecab5c263563c8432aba20efd419 Mon Sep 17 00:00:00 2001 From: tatiana-yan Date: Thu, 7 May 2020 12:42:03 +0300 Subject: [PATCH] [generator] Use the same function when we write/read geometry tags. --- generator/feature_sorter.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/generator/feature_sorter.cpp b/generator/feature_sorter.cpp index e1d94d9adb..bcc2093062 100644 --- a/generator/feature_sorter.cpp +++ b/generator/feature_sorter.cpp @@ -126,18 +126,16 @@ public: } // File Writer finalization function with adding section to the main mwm file. - auto const finalizeFn = [this](unique_ptr w, string const & tag, - string const & postfix = string()) { + auto const finalizeFn = [this](unique_ptr w, string const & tag) { w->Flush(); FilesContainerW writer(m_filename, FileWriter::OP_WRITE_EXISTING); - writer.Write(w->GetName(), tag + postfix); + writer.Write(w->GetName(), tag); }; for (size_t i = 0; i < m_header.GetScalesCount(); ++i) { - string const postfix = strings::to_string(i); - finalizeFn(move(m_geoFile[i]), GEOMETRY_FILE_TAG, postfix); - finalizeFn(move(m_trgFile[i]), TRIANGLE_FILE_TAG, postfix); + finalizeFn(move(m_geoFile[i]), GetTagForIndex(GEOMETRY_FILE_TAG, i)); + finalizeFn(move(m_trgFile[i]), GetTagForIndex(TRIANGLE_FILE_TAG, i)); } finalizeFn(move(m_metadataFile), METADATA_FILE_TAG);