diff options
author | Tom Tromey <tom@tromey.com> | 2019-06-16 09:41:06 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2019-06-25 07:48:23 -0600 |
commit | 6792b55e08ec49f40916d4f8d7168d0047b9e928 (patch) | |
tree | 43542b25631f0e6b792d7294dc7d623f0adbe937 /gdb/tui/tui-data.c | |
parent | 8e5cb9a54e156ba24a439aefa7b35e53b4cb0374 (diff) | |
download | gdb-6792b55e08ec49f40916d4f8d7168d0047b9e928.zip gdb-6792b55e08ec49f40916d4f8d7168d0047b9e928.tar.gz gdb-6792b55e08ec49f40916d4f8d7168d0047b9e928.tar.bz2 |
Use new and delete for TUI windows
This changes tui_win_info to use new and delete, rather than XNEW and
xfree.
gdb/ChangeLog
2019-06-25 Tom Tromey <tom@tromey.com>
* tui/tui-data.h (struct tui_win_info): Add constructor.
* tui/tui-data.c (tui_alloc_win_info): Use new.
(tui_free_window): Use delete.
Diffstat (limited to 'gdb/tui/tui-data.c')
-rw-r--r-- | gdb/tui/tui-data.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/gdb/tui/tui-data.c b/gdb/tui/tui-data.c index b67cb48..117bda3 100644 --- a/gdb/tui/tui-data.c +++ b/gdb/tui/tui-data.c @@ -531,9 +531,8 @@ init_win_info (struct tui_win_info *win_info) struct tui_win_info * tui_alloc_win_info (enum tui_win_type type) { - struct tui_win_info *win_info = XNEW (struct tui_win_info); + struct tui_win_info *win_info = new struct tui_win_info (type); - win_info->generic.type = type; init_win_info (win_info); return win_info; @@ -654,7 +653,7 @@ tui_free_window (struct tui_win_info *win_info) } if (win_info->generic.title) xfree (win_info->generic.title); - xfree (win_info); + delete win_info; } |