[PATCH 13/66] Remove tui_clear_win_detail

Tom Tromey
2019-06-23T22:43:47Z

An earlier patch changed the context of the sole call to
tui_clear_win_detail to make it clear that this can never be called
with a NULL window pointer. So, remove tui_clear_win_detail in favor
of calling the method directly.

gdb/ChangeLog
2019-06-23 Tom Tromey <tom@tromey.com>

* tui/tui-data.h (tui_clear_win_detail): Don't declare.
* tui/tui-data.c (tui_clear_source_windows_detail): Call the
clear_detail method directly.
(tui_clear_win_detail): Remove.
---
gdb/ChangeLog | 7 +++++++
gdb/tui/tui-data.c | 11 +----------
gdb/tui/tui-data.h | 1 -
3 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/gdb/tui/tui-data.c b/gdb/tui/tui-data.c
index b3d68df8f3c..b5852bed0bb 100644
--- a/gdb/tui/tui-data.c
+++ b/gdb/tui/tui-data.c
@@ -159,7 +159,7 @@ void
tui_clear_source_windows_detail ()
{
for (tui_win_info *win : tui_source_windows ())
- tui_clear_win_detail (win);
+ win->clear_detail ();
}

@@ -205,15 +205,6 @@ tui_data_window::clear_detail ()
detail.data_display_info.display_regs = FALSE;
}

-/* Clear the pertinant detail in the windows. */
-void
-tui_clear_win_detail (struct tui_win_info *win_info)
-{
- if (win_info != NULL)
- win_info->clear_detail ();
-}
-
-
/* Accessor for the source execution info ptr. */
struct tui_gen_win_info *
tui_source_exec_info_win_ptr (void)
diff --git a/gdb/tui/tui-data.h b/gdb/tui/tui-data.h
index a4dce4d036b..54cd27c2e46 100644
--- a/gdb/tui/tui-data.h
+++ b/gdb/tui/tui-data.h
@@ -439,7 +439,6 @@ extern struct tui_gen_win_info *tui_disassem_exec_info_win_ptr (void);
extern struct std::vector<tui_win_info *> &tui_source_windows ();
extern void tui_clear_source_windows (void);
extern void tui_clear_source_windows_detail (void);
-extern void tui_clear_win_detail (struct tui_win_info *);
extern void tui_add_to_source_windows (struct tui_win_info *);
extern struct tui_win_info *tui_win_with_focus (void);
extern void tui_set_win_with_focus (struct tui_win_info *);
--
2.17.2