forked from organicmaps/organicmaps
[generator] Fixed OrderTextFileByLine.
This commit is contained in:
parent
df0d573e34
commit
3feec340e5
1 changed files with 4 additions and 2 deletions
|
@ -141,8 +141,10 @@ void OrderTextFileByLine(std::string const & filename)
|
|||
std::ifstream istream;
|
||||
istream.exceptions(std::fstream::badbit);
|
||||
istream.open(filename);
|
||||
std::vector<std::string> lines(std::istream_iterator<std::string>(istream),
|
||||
(std::istream_iterator<std::string>()));
|
||||
std::vector<std::string> lines;
|
||||
std::string line;
|
||||
while (std::getline(istream, line))
|
||||
lines.emplace_back(std::move(line));
|
||||
|
||||
std::sort(std::begin(lines), std::end(lines));
|
||||
istream.close();
|
||||
|
|
Loading…
Add table
Reference in a new issue