Skip to content

Commit

Permalink
Make Stream's destructor public.
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 committed Oct 19, 2024
1 parent c40a726 commit 47baf3d
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 47baf3d

Please sign in to comment.