forked from Imagelibrary/binutils-gdb
Make tui_win_info::name pure virtual
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.
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
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
|
||||
|
||||
@@ -62,10 +62,7 @@ public:
|
||||
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;
|
||||
|
||||
@@ -32,6 +32,11 @@ struct tui_locator_window : public tui_win_info
|
||||
{
|
||||
tui_locator_window () = default;
|
||||
|
||||
const char *name () const override
|
||||
{
|
||||
return STATUS_NAME;
|
||||
}
|
||||
|
||||
int max_height () const override
|
||||
{
|
||||
return 1;
|
||||
|
||||
Reference in New Issue
Block a user