diff options
author | Arsentiy Milchakov <milcars@mapswithme.com> | 2017-10-12 14:20:08 +0300 |
---|---|---|
committer | Yuri Gorshenin <mipt.vi002@gmail.com> | 2017-10-12 15:40:58 +0300 |
commit | b6f415ca49695a5b15f0e8d4870c49627008ec91 (patch) | |
tree | 8886d014e7d3bb9ffce0b7109bd027c96392ae67 /coding/csv_reader.cpp | |
parent | 1edf04cfdeede071e6fd543d036f028e5c41ad46 (diff) |
[ugc] review fixes
Diffstat (limited to 'coding/csv_reader.cpp')
-rw-r--r-- | coding/csv_reader.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/coding/csv_reader.cpp b/coding/csv_reader.cpp index a03279919f..7cc135b506 100644 --- a/coding/csv_reader.cpp +++ b/coding/csv_reader.cpp @@ -7,21 +7,21 @@ namespace coding { using namespace std; -void CSVReader::Read(istringstream & stream, LineByLineCallback const & fn, +void CSVReader::Read(istringstream & stream, RowByRowCallback const & fn, Params const & params) const { - bool readFirstLine = params.m_readHeader; + bool readFirstRow = params.m_readHeader; for (string line; getline(stream, line);) { - Line splitLine; - strings::ParseCSVRow(line, params.m_delimiter, splitLine); - if (!readFirstLine) + Row row; + strings::ParseCSVRow(line, params.m_delimiter, row); + if (!readFirstRow) { - readFirstLine = true; + readFirstRow = true; continue; } - fn(move(splitLine)); + fn(move(row)); } } @@ -29,9 +29,9 @@ void CSVReader::Read(istringstream & stream, FullFileCallback const & fn, Params const & params) const { File file; - Read(stream, [&file](Line && line) + Read(stream, [&file](Row && row) { - file.emplace_back(move(line)); + file.emplace_back(move(row)); }, params); fn(move(file)); |