mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-11-16 12:34:43 +00:00
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:
@@ -3049,7 +3049,7 @@ get_remote_thread_info (thread_info *thread)
|
||||
gdb_assert (thread != NULL);
|
||||
|
||||
if (thread->priv == NULL)
|
||||
thread->priv.reset (new remote_thread_info);
|
||||
thread->priv = std::make_unique<remote_thread_info> ();
|
||||
|
||||
return gdb::checked_static_cast<remote_thread_info *> (thread->priv.get ());
|
||||
}
|
||||
@@ -7099,7 +7099,7 @@ static remote_inferior *
|
||||
get_remote_inferior (inferior *inf)
|
||||
{
|
||||
if (inf->priv == NULL)
|
||||
inf->priv.reset (new remote_inferior);
|
||||
inf->priv = std::make_unique<remote_inferior> ();
|
||||
|
||||
return gdb::checked_static_cast<remote_inferior *> (inf->priv.get ());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user