MusicPipe: automatically clear in destructor

We can implement this now that we have a MusicBuffer reference.
This commit is contained in:
Max Kellermann
2018-06-22 23:09:13 +02:00
parent 9f14e7a98d
commit e81b089612
3 changed files with 8 additions and 23 deletions

View File

@@ -67,12 +67,8 @@ public:
MusicPipe(const MusicPipe &) = delete;
/**
* Frees the object. It must be empty now.
*/
~MusicPipe() {
assert(head == nullptr);
assert(tail_r == &head);
~MusicPipe() noexcept {
Clear();
}
MusicPipe &operator=(const MusicPipe &) = delete;