forked from Imagelibrary/binutils-gdb
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:
@@ -10494,9 +10494,9 @@ watch_command_1 (const char *arg, int accessflag, int from_tty,
|
||||
|
||||
std::unique_ptr<watchpoint> w;
|
||||
if (use_mask)
|
||||
w.reset (new masked_watchpoint (nullptr, bp_type));
|
||||
w = std::make_unique<masked_watchpoint> (nullptr, bp_type);
|
||||
else
|
||||
w.reset (new watchpoint (nullptr, bp_type));
|
||||
w = std::make_unique<watchpoint> (nullptr, bp_type);
|
||||
|
||||
/* At most one of thread or task can be set on a watchpoint. */
|
||||
gdb_assert (thread == -1 || task == -1);
|
||||
|
||||
Reference in New Issue
Block a user