Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ class ByteBufferStreamReader : public ByteStreamReader {
explicit ByteBufferStreamReader(const uint8_t* bytes, size_t size)
: bytes_(bytes), size_(size) {}

virtual ~ByteBufferStreamReader() = default;

// |ByteStreamReader|
uint8_t ReadByte() override {
if (location_ >= size_) {
Expand Down Expand Up @@ -69,6 +71,8 @@ class ByteBufferStreamWriter : public ByteStreamWriter {
assert(buffer);
}

virtual ~ByteBufferStreamWriter() = default;

// |ByteStreamWriter|
void WriteByte(uint8_t byte) { bytes_->push_back(byte); }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ namespace flutter {
// An interface for a class that reads from a byte stream.
class ByteStreamReader {
public:
explicit ByteStreamReader() = default;
virtual ~ByteStreamReader() = default;

// Reads and returns the next byte from the stream.
virtual uint8_t ReadByte() = 0;

Expand Down Expand Up @@ -48,6 +51,9 @@ class ByteStreamReader {
// An interface for a class that writes to a byte stream.
class ByteStreamWriter {
public:
explicit ByteStreamWriter() = default;
virtual ~ByteStreamWriter() = default;

// Writes |byte| to the stream.
virtual void WriteByte(uint8_t byte) = 0;

Expand Down