From 82337dec44347017ca04fe975e85e6d9e4edb635 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 11 May 2014 16:59:19 +0200 Subject: InputStream: add virtual destructor Replaces the method Close(). --- src/input/InputStream.cxx | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'src/input/InputStream.cxx') diff --git a/src/input/InputStream.cxx b/src/input/InputStream.cxx index d54eca643..2e0df6856 100644 --- a/src/input/InputStream.cxx +++ b/src/input/InputStream.cxx @@ -31,6 +31,10 @@ static constexpr Domain input_domain("input"); +InputStream::~InputStream() +{ +} + InputStream * InputStream::Open(const char *url, Mutex &mutex, Cond &cond, @@ -41,7 +45,6 @@ InputStream::Open(const char *url, is = plugin->open(url, mutex, cond, error); if (is != nullptr) { - assert(is->plugin.close != nullptr); assert(is->plugin.read != nullptr); assert(is->plugin.eof != nullptr); assert(!is->seekable || is->plugin.seek != nullptr); @@ -72,7 +75,7 @@ InputStream::OpenReady(const char *uri, mutex.unlock(); if (!success) { - is->Close(); + delete is; is = nullptr; } @@ -202,12 +205,6 @@ InputStream::LockRead(void *ptr, size_t _size, Error &error) return Read(ptr, _size, error); } -void -InputStream::Close() -{ - plugin.close(this); -} - bool InputStream::IsEOF() { -- cgit v1.2.3