This repository was archived by the owner on Feb 25, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed
shell/platform/common/cpp/client_wrapper Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,8 @@ class ByteBufferStreamReader : public ByteStreamReader {
2323 explicit ByteBufferStreamReader (const uint8_t * bytes, size_t size)
2424 : bytes_(bytes), size_(size) {}
2525
26+ virtual ~ByteBufferStreamReader () = default ;
27+
2628 // |ByteStreamReader|
2729 uint8_t ReadByte () override {
2830 if (location_ >= size_) {
@@ -69,6 +71,8 @@ class ByteBufferStreamWriter : public ByteStreamWriter {
6971 assert (buffer);
7072 }
7173
74+ virtual ~ByteBufferStreamWriter () = default ;
75+
7276 // |ByteStreamWriter|
7377 void WriteByte (uint8_t byte) { bytes_->push_back (byte); }
7478
Original file line number Diff line number Diff line change @@ -12,6 +12,9 @@ namespace flutter {
1212// An interface for a class that reads from a byte stream.
1313class ByteStreamReader {
1414 public:
15+ explicit ByteStreamReader () = default;
16+ virtual ~ByteStreamReader () = default ;
17+
1518 // Reads and returns the next byte from the stream.
1619 virtual uint8_t ReadByte () = 0;
1720
@@ -48,6 +51,9 @@ class ByteStreamReader {
4851// An interface for a class that writes to a byte stream.
4952class ByteStreamWriter {
5053 public:
54+ explicit ByteStreamWriter () = default;
55+ virtual ~ByteStreamWriter () = default ;
56+
5157 // Writes |byte| to the stream.
5258 virtual void WriteByte (uint8_t byte) = 0;
5359
You can’t perform that action at this time.
0 commit comments