It seemed cleaner to me for tui_win_info::name to be pure virtual.
This meant adding a name method to the locator window; but this too
seems like an improvement.
gdb/ChangeLog
2020-07-01 Tom Tromey <tom@tromey.com>
* tui/tui-data.h (struct tui_win_info) <name>: Now pure virtual.
* tui/tui-stack.h (struct tui_locator_window) <name>: New method.
+2020-07-01 Tom Tromey <tom@tromey.com>
+
+ * tui/tui-data.h (struct tui_win_info) <name>: Now pure virtual.
+ * tui/tui-stack.h (struct tui_locator_window) <name>: New method.
+
2020-07-01 Tom Tromey <tom@tromey.com>
* tui/tui-wingeneral.c (tui_win_info::refresh_window): Move from
virtual void make_visible (bool visible);
/* Return the name of this type of window. */
- virtual const char *name () const
- {
- return "";
- }
+ virtual const char *name () const = 0;
/* Compute the maximum height of this window. */
virtual int max_height () const;
{
tui_locator_window () = default;
+ const char *name () const override
+ {
+ return STATUS_NAME;
+ }
+
int max_height () const override
{
return 1;