diff options
author | Max Kellermann <max@musicpd.org> | 2018-02-17 08:31:19 +0100 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2018-02-17 08:31:19 +0100 |
commit | cc3c1f31d018aa0bd6b55a5f7444a209de83e92a (patch) | |
tree | d184cff99cd458d1809443ce539f4a24988d920a /test | |
parent | 5909502a13a2c25595108fcb4d2757b3530f0431 (diff) |
test/DumpDecoderClient: convert to class
Diffstat (limited to 'test')
-rw-r--r-- | test/DumpDecoderClient.hxx | 9 | ||||
-rw-r--r-- | test/run_decoder.cxx | 2 |
2 files changed, 8 insertions, 3 deletions
diff --git a/test/DumpDecoderClient.hxx b/test/DumpDecoderClient.hxx index 909127d56..3235d233b 100644 --- a/test/DumpDecoderClient.hxx +++ b/test/DumpDecoderClient.hxx @@ -29,11 +29,16 @@ * A #DecoderClient implementation which dumps metadata to stderr and * decoded data to stdout. */ -struct DumpDecoderClient final : DecoderClient { +class DumpDecoderClient final : public DecoderClient { + bool initialized = false; + +public: Mutex mutex; Cond cond; - bool initialized = false; + bool IsInitialized() const noexcept { + return initialized; + } /* virtual methods from DecoderClient */ void Ready(AudioFormat audio_format, diff --git a/test/run_decoder.cxx b/test/run_decoder.cxx index c4d47c804..536b3b45d 100644 --- a/test/run_decoder.cxx +++ b/test/run_decoder.cxx @@ -131,7 +131,7 @@ try { return EXIT_FAILURE; } - if (!client.initialized) { + if (!client.IsInitialized()) { fprintf(stderr, "Decoding failed\n"); return EXIT_FAILURE; } |