diff options
author | Max Kellermann <max@duempel.org> | 2016-02-21 12:53:47 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2016-02-21 12:53:47 +0100 |
commit | 0705f42cf8be9224780c09d21e5568ac9c9f086e (patch) | |
tree | ef41015106b8b153d1efc8656b96c0604c57c0a5 /test/dump_text_file.cxx | |
parent | cadc67ea40d761281d768256514d6660d820500f (diff) |
playlist/Plugin: pass InputStreamPtr&& to open_stream()
Obsolete class CloseSongEnumerator, which was a kludge.
Diffstat (limited to 'test/dump_text_file.cxx')
-rw-r--r-- | test/dump_text_file.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/test/dump_text_file.cxx b/test/dump_text_file.cxx index 467aeb4f5..b112a26ee 100644 --- a/test/dump_text_file.cxx +++ b/test/dump_text_file.cxx @@ -44,23 +44,23 @@ dump_text_file(TextInputStream &is) } static int -dump_input_stream(InputStream &is) +dump_input_stream(InputStreamPtr &&is) { { - TextInputStream tis(is); + TextInputStream tis(std::move(is)); dump_text_file(tis); } - is.Lock(); + is->Lock(); Error error; - if (!is.Check(error)) { + if (!is->Check(error)) { LogError(error); - is.Unlock(); + is->Unlock(); return EXIT_FAILURE; } - is.Unlock(); + is->Unlock(); return 0; } @@ -98,7 +98,7 @@ int main(int argc, char **argv) auto is = InputStream::OpenReady(argv[1], mutex, cond, error); if (is) { - ret = dump_input_stream(*is); + ret = dump_input_stream(std::move(is)); } else { if (error.IsDefined()) LogError(error); |