kastnermario / yaml-cpp

Automatically exported from code.google.com/p/yaml-cpp
MIT License
0 stars 0 forks source link

Signature of Parser::GetNextDocument #45

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
It would probably be nice if, like getline with stdlib iostreams,
Parser::GetNextDocument would return a bool to indicate if there is still a
document available, so you'd be able to 

while (parser.GetNextDocument(doc)) {
  // do something with doc
}

instead of 

while (parser) {
  parser.GetNextDocument(doc);
  // ...
}

A patch is attached, seemed straightforward if I didn't miss anything ...

Original issue reported on code.google.com by stefan.walk on 29 Sep 2009 at 4:27

Attachments:

GoogleCodeExporter commented 8 years ago
Good idea! Committed in r266.

Original comment by jbe...@gmail.com on 29 Sep 2009 at 6:25