diff options
author | Max Kellermann <max@duempel.org> | 2014-05-11 16:59:19 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-05-11 17:12:50 +0200 |
commit | 82337dec44347017ca04fe975e85e6d9e4edb635 (patch) | |
tree | 308036d4a7abbd2bb04ed472dc1fbacdc2587871 /test | |
parent | f1d07002521a4a98acf130127cf42aef20a5e258 (diff) | |
download | mpd-82337dec44347017ca04fe975e85e6d9e4edb635.tar.gz mpd-82337dec44347017ca04fe975e85e6d9e4edb635.tar.xz mpd-82337dec44347017ca04fe975e85e6d9e4edb635.zip |
InputStream: add virtual destructor
Replaces the method Close().
Diffstat (limited to '')
-rw-r--r-- | test/dump_playlist.cxx | 5 | ||||
-rw-r--r-- | test/dump_text_file.cxx | 2 | ||||
-rw-r--r-- | test/read_tags.cxx | 2 | ||||
-rw-r--r-- | test/run_decoder.cxx | 2 | ||||
-rw-r--r-- | test/run_input.cxx | 2 |
5 files changed, 6 insertions, 7 deletions
diff --git a/test/dump_playlist.cxx b/test/dump_playlist.cxx index 5f7fad993..5928c8eb4 100644 --- a/test/dump_playlist.cxx +++ b/test/dump_playlist.cxx @@ -105,7 +105,7 @@ int main(int argc, char **argv) playlist = playlist_list_open_stream(*is, uri); if (playlist == NULL) { - is->Close(); + delete is; fprintf(stderr, "Failed to open playlist\n"); return 2; } @@ -139,8 +139,7 @@ int main(int argc, char **argv) /* deinitialize everything */ delete playlist; - if (is != NULL) - is->Close(); + delete is; decoder_plugin_deinit_all(); playlist_list_global_finish(); diff --git a/test/dump_text_file.cxx b/test/dump_text_file.cxx index a2fc10b3f..79b402b5a 100644 --- a/test/dump_text_file.cxx +++ b/test/dump_text_file.cxx @@ -112,7 +112,7 @@ int main(int argc, char **argv) InputStream *is = InputStream::OpenReady(argv[1], mutex, cond, error); if (is != NULL) { ret = dump_input_stream(*is); - is->Close(); + delete is; } else { if (error.IsDefined()) LogError(error); diff --git a/test/read_tags.cxx b/test/read_tags.cxx index c525c8064..f11b04f7a 100644 --- a/test/read_tags.cxx +++ b/test/read_tags.cxx @@ -127,7 +127,7 @@ int main(int argc, char **argv) } success = plugin->ScanStream(*is, print_handler, nullptr); - is->Close(); + delete is; } decoder_plugin_deinit_all(); diff --git a/test/run_decoder.cxx b/test/run_decoder.cxx index 58731d5a5..c6f25b3fc 100644 --- a/test/run_decoder.cxx +++ b/test/run_decoder.cxx @@ -230,7 +230,7 @@ int main(int argc, char **argv) decoder.plugin->StreamDecode(decoder, *is); - is->Close(); + delete is; } else { fprintf(stderr, "Decoder plugin is not usable\n"); return EXIT_FAILURE; diff --git a/test/run_input.cxx b/test/run_input.cxx index 4a35e1479..130d0f031 100644 --- a/test/run_input.cxx +++ b/test/run_input.cxx @@ -132,7 +132,7 @@ int main(int argc, char **argv) is = InputStream::OpenReady(argv[1], mutex, cond, error); if (is != NULL) { ret = dump_input_stream(is); - is->Close(); + delete is; } else { if (error.IsDefined()) LogError(error); |