diff options
author | Lancelot Six <lancelot.six@amd.com> | 2023-09-14 11:13:24 +0000 |
---|---|---|
committer | Lancelot Six <lancelot.six@amd.com> | 2023-11-21 11:52:35 +0000 |
commit | 6b62451ad08056f0ba02e192ec34ef67c4294ef4 (patch) | |
tree | 761f6e5a19e9e16d87ec955929aecd025166e335 /gdb/mi | |
parent | 1367eeec2cbd1bb14b89030e199d06fc676ffc49 (diff) | |
download | gdb-6b62451ad08056f0ba02e192ec34ef67c4294ef4.zip gdb-6b62451ad08056f0ba02e192ec34ef67c4294ef4.tar.gz gdb-6b62451ad08056f0ba02e192ec34ef67c4294ef4.tar.bz2 |
gdb: Use C++17's std::make_unique instead of gdb::make_unique
gdb::make_unique is a wrapper around std::make_unique when compiled with
C++17. Now that C++17 is required, use std::make_unique directly in the
codebase, and remove gdb::make_unique.
Change-Id: I80b615e46e4b7c097f09d78e579a9bdce00254ab
Approved-By: Tom Tromey <tom@tromey.com>
Approved-By: Pedro Alves <pedro@palves.net
Diffstat (limited to 'gdb/mi')
-rw-r--r-- | gdb/mi/mi-main.c | 2 | ||||
-rw-r--r-- | gdb/mi/mi-out.c | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c index abcd0d3..14ed2a1 100644 --- a/gdb/mi/mi-main.c +++ b/gdb/mi/mi-main.c @@ -1932,7 +1932,7 @@ mi_execute_command (const char *cmd, int from_tty) = gdb::checked_static_cast<mi_interp *> (command_interp ()); try { - command = gdb::make_unique<mi_parse> (cmd, &token); + command = std::make_unique<mi_parse> (cmd, &token); } catch (const gdb_exception &exception) { diff --git a/gdb/mi/mi-out.c b/gdb/mi/mi-out.c index bbd2128..0bc13f9 100644 --- a/gdb/mi/mi-out.c +++ b/gdb/mi/mi-out.c @@ -340,13 +340,13 @@ std::unique_ptr<mi_ui_out> mi_out_new (const char *mi_version) { if (streq (mi_version, INTERP_MI4) || streq (mi_version, INTERP_MI)) - return gdb::make_unique<mi_ui_out> (4); + return std::make_unique<mi_ui_out> (4); if (streq (mi_version, INTERP_MI3)) - return gdb::make_unique<mi_ui_out> (3); + return std::make_unique<mi_ui_out> (3); if (streq (mi_version, INTERP_MI2)) - return gdb::make_unique<mi_ui_out> (2); + return std::make_unique<mi_ui_out> (2); return nullptr; } |