output/{recorder,httpd,shout}: use std::unique_ptr to manage PreparedEncoder pointer

This commit is contained in:
Max Kellermann
2017-11-10 21:35:22 +01:00
parent c54a920d13
commit 13816c1c7d
4 changed files with 9 additions and 18 deletions
@@ -79,7 +79,7 @@ HttpdOutput::HttpdOutput(EventLoop &_loop, const ConfigBlock &block)
/* initialize encoder */
prepared_encoder = encoder_init(*encoder_plugin, block);
prepared_encoder.reset(encoder_init(*encoder_plugin, block));
/* determine content type */
content_type = prepared_encoder->GetMimeType();
@@ -87,11 +87,6 @@ HttpdOutput::HttpdOutput(EventLoop &_loop, const ConfigBlock &block)
content_type = "application/octet-stream";
}
HttpdOutput::~HttpdOutput()
{
delete prepared_encoder;
}
inline void
HttpdOutput::Bind()
{