Use std::make_unique in more places

I searched for spots using ".reset (new ...)" and replaced most of
these with std::make_unique.  I think this is a bit cleaner and more
idiomatic.

Regression tested on x86-64 Fedora 40.

Reviewed-By: Klaus Gerlicher<klaus.gerlicher@intel.com>
This commit is contained in:
Tom Tromey
2024-10-08 19:31:51 -06:00
parent 32dc367249
commit 40ae603e6e
11 changed files with 35 additions and 31 deletions

View File

@@ -100,7 +100,7 @@ void
parser_state::mark_struct_expression (expr::structop_base_operation *op)
{
gdb_assert (parse_completion && m_completion_state == nullptr);
m_completion_state.reset (new expr_complete_structop (op));
m_completion_state = std::make_unique<expr_complete_structop> (op);
}
/* Indicate that the current parser invocation is completing a tag.