diff options
author | Tom Tromey <tom@tromey.com> | 2024-10-08 19:31:51 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2024-10-20 10:13:05 -0600 |
commit | 40ae603e6e0fe21fd0c1677dcf4e137cf99c2ebe (patch) | |
tree | 37b815b09eb8c8da38cd0846cdc7cd9136149167 /gdb/breakpoint.c | |
parent | 32dc367249e85ecb2449d4be8cafc8e3fc2f359f (diff) | |
download | binutils-40ae603e6e0fe21fd0c1677dcf4e137cf99c2ebe.zip binutils-40ae603e6e0fe21fd0c1677dcf4e137cf99c2ebe.tar.gz binutils-40ae603e6e0fe21fd0c1677dcf4e137cf99c2ebe.tar.bz2 |
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>
Diffstat (limited to 'gdb/breakpoint.c')
-rw-r--r-- | gdb/breakpoint.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 4cf6857..b7e4f5d 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -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); |