diff options
author | Tom Tromey <tromey@adacore.com> | 2022-06-23 14:37:57 -0600 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2022-07-18 08:49:55 -0600 |
commit | 66fd2c678e4bbd5855f0f09870862143a518bc58 (patch) | |
tree | b8ae901c02e790aaf429dd12c28b090cebbc4f7f | |
parent | efd3baf0dcb38d7ecc2c8b4d1553254d3c022b7a (diff) | |
download | gdb-66fd2c678e4bbd5855f0f09870862143a518bc58.zip gdb-66fd2c678e4bbd5855f0f09870862143a518bc58.tar.gz gdb-66fd2c678e4bbd5855f0f09870862143a518bc58.tar.bz2 |
Remove cli_out_new
cli_out_new is just a small wrapper around 'new'. This patch removes
it, replacing it with uses of 'new' instead.
-rw-r--r-- | gdb/cli-out.c | 8 | ||||
-rw-r--r-- | gdb/cli-out.h | 4 | ||||
-rw-r--r-- | gdb/cli/cli-interp.c | 2 | ||||
-rw-r--r-- | gdb/mi/mi-interp.c | 2 | ||||
-rw-r--r-- | gdb/tui/tui-io.c | 2 |
5 files changed, 4 insertions, 14 deletions
diff --git a/gdb/cli-out.c b/gdb/cli-out.c index e0802df..fdbed6f 100644 --- a/gdb/cli-out.c +++ b/gdb/cli-out.c @@ -386,14 +386,6 @@ cli_ui_out::~cli_ui_out () { } -/* Initialize private members at startup. */ - -cli_ui_out * -cli_out_new (struct ui_file *stream) -{ - return new cli_ui_out (stream, ui_source_list); -} - ui_file * cli_ui_out::set_stream (struct ui_file *stream) { diff --git a/gdb/cli-out.h b/gdb/cli-out.h index 3fc794b..3f01fe0 100644 --- a/gdb/cli-out.h +++ b/gdb/cli-out.h @@ -27,7 +27,7 @@ class cli_ui_out : public ui_out { public: - explicit cli_ui_out (ui_file *stream, ui_out_flags flags); + explicit cli_ui_out (ui_file *stream, ui_out_flags flags = ui_source_list); virtual ~cli_ui_out (); ui_file *set_stream (ui_file *stream); @@ -113,8 +113,6 @@ private: std::vector<cli_progress_info> m_meters; }; -extern cli_ui_out *cli_out_new (struct ui_file *stream); - extern void cli_display_match_list (char **matches, int len, int max); #endif diff --git a/gdb/cli/cli-interp.c b/gdb/cli/cli-interp.c index 036bc72..c26b6a7 100644 --- a/gdb/cli/cli-interp.c +++ b/gdb/cli/cli-interp.c @@ -59,7 +59,7 @@ cli_interp::cli_interp (const char *name) : cli_interp_base (name) { /* Create a default uiout builder for the CLI. */ - this->cli_uiout = cli_out_new (gdb_stdout); + this->cli_uiout = new cli_ui_out (gdb_stdout); } cli_interp::~cli_interp () diff --git a/gdb/mi/mi-interp.c b/gdb/mi/mi-interp.c index 937a3d9..ae15177 100644 --- a/gdb/mi/mi-interp.c +++ b/gdb/mi/mi-interp.c @@ -141,7 +141,7 @@ mi_interp::init (bool top_level) mi->event_channel = new mi_console_file (mi->raw_stdout, "=", 0); mi->mi_uiout = mi_out_new (name ()); gdb_assert (mi->mi_uiout != nullptr); - mi->cli_uiout = cli_out_new (mi->out); + mi->cli_uiout = new cli_ui_out (mi->out); if (top_level) { diff --git a/gdb/tui/tui-io.c b/gdb/tui/tui-io.c index 22c234a..deea9b9 100644 --- a/gdb/tui/tui-io.c +++ b/gdb/tui/tui-io.c @@ -910,7 +910,7 @@ tui_initialize_io (void) tui_out = tui_out_new (tui_stdout); /* Create the default UI. */ - tui_old_uiout = cli_out_new (gdb_stdout); + tui_old_uiout = new cli_ui_out (gdb_stdout); #ifdef TUI_USE_PIPE_FOR_READLINE /* Temporary solution for readline writing to stdout: redirect |