Make tui_gen_win_info constructor protected
Now that all the window types have their own concrete classes, the tui_gen_win_info constructor can be protected. gdb/ChangeLog 2019-06-25 Tom Tromey <tom@tromey.com> * tui/tui-layout.c (init_and_make_win): Assert on unrecognized type. * tui/tui-data.h (struct tui_gen_win_info): Make constructor protected.
This commit is contained in:
parent
f7952c5774
commit
fb54fa768d
3 changed files with 12 additions and 3 deletions
|
@ -1,3 +1,10 @@
|
|||
2019-06-25 Tom Tromey <tom@tromey.com>
|
||||
|
||||
* tui/tui-layout.c (init_and_make_win): Assert on unrecognized
|
||||
type.
|
||||
* tui/tui-data.h (struct tui_gen_win_info): Make constructor
|
||||
protected.
|
||||
|
||||
2019-06-25 Tom Tromey <tom@tromey.com>
|
||||
|
||||
* tui/tui-winsource.c
|
||||
|
|
|
@ -34,11 +34,15 @@ struct tui_point
|
|||
/* Generic window information. */
|
||||
struct tui_gen_win_info
|
||||
{
|
||||
protected:
|
||||
|
||||
explicit tui_gen_win_info (enum tui_win_type t)
|
||||
: type (t)
|
||||
{
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
virtual ~tui_gen_win_info ();
|
||||
|
||||
/* Call to refresh this window. */
|
||||
|
|
|
@ -815,9 +815,7 @@ init_and_make_win (tui_gen_win_info *win_info,
|
|||
break;
|
||||
|
||||
default:
|
||||
gdb_assert (tui_win_is_auxiliary (win_type));
|
||||
win_info = new tui_gen_win_info (win_type);
|
||||
break;
|
||||
gdb_assert_not_reached (_("unhandled window type"));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue