Skip to content
This repository has been archived by the owner on May 16, 2024. It is now read-only.

Commit

Permalink
Merge pull request #77 from mlcommons/protoio-bugfix
Browse files Browse the repository at this point in the history
Add missing is_open() to ProtoInputStream
  • Loading branch information
srinivas212 authored Dec 6, 2023
2 parents e6e0a34 + d61b00c commit e7d7a7c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions third_party/utils/protoio.cc
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,10 @@ void ProtoInputStream::reset() {
createStreams();
}

bool ProtoInputStream::is_open() {
return fileStream.is_open();
}

bool ProtoInputStream::read(Message& msg) {
// Read a message from the stream by getting the size, using it as
// a limit when parsing the message, then popping the limit again
Expand Down
2 changes: 2 additions & 0 deletions third_party/utils/protoio.hh
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@ class ProtoInputStream : public ProtoStream {
*/
~ProtoInputStream();

bool is_open();

/**
* Read a message from the stream.
*
Expand Down

0 comments on commit e7d7a7c

Please sign in to comment.