Skip to content

Commit

Permalink
Make Stream's destructor public. (#183)
Browse files Browse the repository at this point in the history
A public destructor is needed to move around streams with their
interface pointers (or std::unique_ptr<Stream>) instead of the specific
implementation.
  • Loading branch information
PieroV authored Jan 3, 2025
1 parent 157ab48 commit bfafca7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions include/ozz/base/io/stream.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,12 @@ class OZZ_BASE_DLL Stream {
// Returns the current size of the stream.
virtual size_t Size() const = 0;

protected:
Stream() {}

// Required virtual destructor.
virtual ~Stream() {}

protected:
Stream() {}

private:
Stream(const Stream&);
void operator=(const Stream&);
Expand Down

0 comments on commit bfafca7

Please sign in to comment.