Remove make_data_window
authorTom Tromey <tom@tromey.com>
Mon, 1 Jul 2019 20:37:38 +0000 (14:37 -0600)
committerTom Tromey <tom@tromey.com>
Wed, 17 Jul 2019 18:19:19 +0000 (12:19 -0600)
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.

gdb/ChangeLog
gdb/tui/tui-layout.c

index 23852c7c44703cd2720e7924bd7c4cb1ca8c90f5..4a43ba44da7765139717be46b6da7cff006195fd 100644 (file)
@@ -1,3 +1,8 @@
+2019-07-17  Tom Tromey  <tom@tromey.com>
+
+       * tui/tui-layout.c (make_data_window): Remove.
+       (show_data): Unify creation and re-initialization cases.
+
 2019-07-17  Tom Tromey  <tom@tromey.com>
 
        * tui/tui-layout.c (make_source_window, make_disasm_window):
index b1f784609d513310ef64d3660d81c91b941319e8..7478c2c966a0a502b87d908be828e0770fd4452e 100644 (file)
@@ -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)
This page took 0.02922 seconds and 4 git commands to generate.