unique_ptr/new to make_unique

The latter is easier to read and is the "correct" thing to do.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev
2021-08-20 23:03:22 -07:00
parent bedcf1cce5
commit 40c6a214e3
2 changed files with 2 additions and 2 deletions

View File

@@ -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;
}