summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2020-09-07 20:02:50 +0200
committerMax Kellermann <max@musicpd.org>2020-09-07 20:04:13 +0200
commitd7838950d8866127bab5072532fa6e438728c9c1 (patch)
treeaaaded789d7f2e0901234a830c458416feec567d
parent2e93a83dd5c3c5fd301e963904f114c7f72e9a6d (diff)
test/run_input: use WithBufferedOutputStream()
-rw-r--r--test/dump_playlist.cxx6
-rw-r--r--test/run_input.cxx6
2 files changed, 6 insertions, 6 deletions
diff --git a/test/dump_playlist.cxx b/test/dump_playlist.cxx
index ea3be3a3f..ba973703b 100644
--- a/test/dump_playlist.cxx
+++ b/test/dump_playlist.cxx
@@ -41,9 +41,9 @@ static void
tag_save(FILE *file, const Tag &tag)
{
StdioOutputStream sos(file);
- BufferedOutputStream bos(sos);
- tag_save(bos, tag);
- bos.Flush();
+ WithBufferedOutputStream(sos, [&](auto &bos){
+ tag_save(bos, tag);
+ });
}
int main(int argc, char **argv)
diff --git a/test/run_input.cxx b/test/run_input.cxx
index d5648f11a..4c067fb45 100644
--- a/test/run_input.cxx
+++ b/test/run_input.cxx
@@ -124,9 +124,9 @@ static void
tag_save(FILE *file, const Tag &tag)
{
StdioOutputStream sos(file);
- BufferedOutputStream bos(sos);
- tag_save(bos, tag);
- bos.Flush();
+ WithBufferedOutputStream(sos, [&](auto &bos){
+ tag_save(bos, tag);
+ });
}
static int