diff options
author | Tom Tromey <tom@tromey.com> | 2020-07-01 21:21:12 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2020-07-01 21:21:17 -0600 |
commit | 1cdf9e33eadd3bf091fe64ed30daa0263f736ea2 (patch) | |
tree | a7ce87aafc883817384998cb5a7aec2888a8b4c9 /gdb | |
parent | 32c1e2100975c073b3c1d9e2041de9f74b6e2049 (diff) | |
download | gdb-1cdf9e33eadd3bf091fe64ed30daa0263f736ea2.zip gdb-1cdf9e33eadd3bf091fe64ed30daa0263f736ea2.tar.gz gdb-1cdf9e33eadd3bf091fe64ed30daa0263f736ea2.tar.bz2 |
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.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/tui/tui-data.h | 5 | ||||
-rw-r--r-- | gdb/tui/tui-stack.h | 5 |
3 files changed, 11 insertions, 4 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index ec87edf..662e6b9 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 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 tui_gen_win_info. (tui_win_info::make_window): Merge with diff --git a/gdb/tui/tui-data.h b/gdb/tui/tui-data.h index 3c14b26..5e7a122 100644 --- a/gdb/tui/tui-data.h +++ b/gdb/tui/tui-data.h @@ -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; diff --git a/gdb/tui/tui-stack.h b/gdb/tui/tui-stack.h index 564ac22..9ff57b1 100644 --- a/gdb/tui/tui-stack.h +++ b/gdb/tui/tui-stack.h @@ -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; |