File tree Expand file tree Collapse file tree 2 files changed +8
-7
lines changed
Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -41,13 +41,14 @@ class TableOutput : public Output {
4141 Euclid::Table::Table table {m_rows};
4242 m_table_handler (table);
4343 }
44- auto written = m_rows.size ();
44+ m_total_rows_written + = m_rows.size ();
4545 m_rows.clear ();
46- return written ;
46+ return m_total_rows_written ;
4747 }
4848
4949 TableOutput (SourceToRowConverter source_to_row, TableHandler table_handler, size_t flush_size)
50- : m_source_to_row(source_to_row), m_table_handler(table_handler), m_flush_size(flush_size) {
50+ : m_source_to_row(source_to_row), m_table_handler(table_handler),
51+ m_flush_size(flush_size), m_total_rows_written(0 ) {
5152 }
5253
5354 void outputSource (const SourceInterface& source) override {
@@ -62,6 +63,7 @@ class TableOutput : public Output {
6263 TableHandler m_table_handler;
6364 std::vector<Euclid::Table::Row> m_rows {};
6465 size_t m_flush_size;
66+ size_t m_total_rows_written;
6567};
6668
6769} /* namespace SourceXtractor */
Original file line number Diff line number Diff line change @@ -78,10 +78,9 @@ void OutputConfig::initialize(const UserValues& args) {
7878
7979 auto & format = args.at (OUTPUT_FILE_FORMAT).as <std::string>();
8080 m_format = format_map.at (format);
81- m_flush_size = args.at (OUTPUT_FLUSH_SIZE).as <int >();
82- if (m_flush_size < 0 ) {
83- m_flush_size = 0 ;
84- }
81+
82+ int flush_size = args.at (OUTPUT_FLUSH_SIZE).as <int >();
83+ m_flush_size = (flush_size >= 0 ) ? flush_size : 0 ;
8584}
8685
8786std::string OutputConfig::getOutputFile () {
You can’t perform that action at this time.
0 commit comments