diff options
author | Tom Tromey <tom@tromey.com> | 2019-07-01 14:37:38 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2019-07-17 12:19:19 -0600 |
commit | 0912922656b9fec5f04623ea49292b7ae564c7ef (patch) | |
tree | 9c2e7e52707d4c69f6e1b39bd3397821e05b2450 /gdb/tui | |
parent | 4a8a5e84a777c7c267503a1d1ee15bce2ba19d1d (diff) | |
download | gdb-0912922656b9fec5f04623ea49292b7ae564c7ef.zip gdb-0912922656b9fec5f04623ea49292b7ae564c7ef.tar.gz gdb-0912922656b9fec5f04623ea49292b7ae564c7ef.tar.bz2 |
Remove make_data_window
As with the previous patches, unifying the creation and
re-initialization cases for the data window lets us remove
make_data_window in favor of simply using "new".
gdb/ChangeLog
2019-07-17 Tom Tromey <tom@tromey.com>
* tui/tui-layout.c (make_data_window): Remove.
(show_data): Unify creation and re-initialization cases.
Diffstat (limited to 'gdb/tui')
-rw-r--r-- | gdb/tui/tui-layout.c | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/gdb/tui/tui-layout.c b/gdb/tui/tui-layout.c index b1f7846..7478c2c 100644 --- a/gdb/tui/tui-layout.c +++ b/gdb/tui/tui-layout.c @@ -476,18 +476,6 @@ prev_layout (void) return (enum tui_layout_type) new_layout; } - -static tui_win_info * -make_data_window (int height, int origin_y) -{ - tui_win_info *result = new tui_data_window (); - result->reset (height, tui_term_width (), 0, origin_y); - result->make_visible (true); - return result; -} - - - /* Show the Source/Command layout. */ static void show_source_command (void) @@ -581,9 +569,8 @@ show_data (enum tui_layout_type new_layout) tui_make_all_invisible (); tui_make_invisible (locator); if (tui_win_list[DATA_WIN] == nullptr) - tui_win_list[DATA_WIN] = make_data_window (data_height, 0); - else - tui_win_list[DATA_WIN]->reset (data_height, tui_term_width (), 0, 0); + tui_win_list[DATA_WIN] = new tui_data_window (); + tui_win_list[DATA_WIN]->reset (data_height, tui_term_width (), 0, 0); tui_win_list[DATA_WIN]->make_visible (true); if (new_layout == SRC_DATA_COMMAND) |