Turn tui_erase_source_content into a method
authorTom Tromey <tom@tromey.com>
Sat, 6 Jul 2019 21:57:53 +0000 (15:57 -0600)
committerTom Tromey <tom@tromey.com>
Thu, 15 Aug 2019 18:29:28 +0000 (12:29 -0600)
commite25d200487dba7dfdf92f638e4ef2aefd7bd7481
treedbf59cf936e9e73a5de26143726cd61a403a1852
parent002f15c27779e154856fdf281360385f4d3be671
Turn tui_erase_source_content into a method

This changes tui_erase_source_content into a method on
tui_source_window_base.  The bulk of the work is moved into a helper
method, so that the callers can each pass the string appropriate to
the particular window class.

gdb/ChangeLog
2019-08-15  Tom Tromey  <tom@tromey.com>

* tui/tui-winsource.h (struct tui_source_window_base)
<do_erase_source_content>: New method.
<erase_source_content>: New method.
(tui_erase_source_content): Don't declare.
* tui/tui-winsource.c (tui_clear_source_content): Update.
(tui_source_window_base::do_erase_source_content): Rename from
tui_erase_source_content.
(tui_source_window_base::show_source_content): Update.
* tui/tui-win.c (tui_resize_all, tui_adjust_win_heights): Update.
* tui/tui-source.h (struct tui_source_window)
<erase_source_content>: New method.
* tui/tui-disasm.h (struct tui_disasm_window)
<erase_source_content>: New method.
gdb/ChangeLog
gdb/tui/tui-disasm.h
gdb/tui/tui-source.h
gdb/tui/tui-win.c
gdb/tui/tui-winsource.c
gdb/tui/tui-winsource.h