Commit 40c6a214 authored by Rosen Penev's avatar Rosen Penev

unique_ptr/new to make_unique

The latter is easier to read and is the "correct" thing to do. Signed-off-by: 's avatarRosen Penev <rosenp@gmail.com>
parent bedcf1cc
......@@ -121,7 +121,7 @@ std::unique_ptr<Filter>
convert_filter_new(const AudioFormat in_audio_format,
const AudioFormat out_audio_format)
{
std::unique_ptr<ConvertFilter> filter(new ConvertFilter(in_audio_format));
auto filter = std::make_unique<ConvertFilter>(in_audio_format);
filter->Set(out_audio_format);
return filter;
}
......
......@@ -158,7 +158,7 @@ TagBuilder::Commit() noexcept
std::unique_ptr<Tag>
TagBuilder::CommitNew() noexcept
{
std::unique_ptr<Tag> tag(new Tag());
auto tag = std::make_unique<Tag>();
Commit(*tag);
return tag;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment