aboutsummaryrefslogtreecommitdiff
path: root/gdb/tui/tui-data.h
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/tui/tui-data.h')
-rw-r--r--gdb/tui/tui-data.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/gdb/tui/tui-data.h b/gdb/tui/tui-data.h
index 6d4fb78..4710c76 100644
--- a/gdb/tui/tui-data.h
+++ b/gdb/tui/tui-data.h
@@ -36,6 +36,15 @@ struct tui_point
int x, y;
};
+/* A deleter that calls delwin. */
+struct curses_deleter
+{
+ void operator() (WINDOW *win) const
+ {
+ delwin (win);
+ }
+};
+
/* Generic window information. */
struct tui_gen_win_info
{
@@ -57,7 +66,9 @@ protected:
public:
tui_gen_win_info (tui_gen_win_info &&) = default;
- virtual ~tui_gen_win_info ();
+ virtual ~tui_gen_win_info ()
+ {
+ }
/* Call to refresh this window. */
virtual void refresh_window ();
@@ -83,7 +94,7 @@ public:
}
/* Window handle. */
- WINDOW *handle = nullptr;
+ std::unique_ptr<WINDOW, curses_deleter> handle;
/* Type of window. */
enum tui_win_type type;
/* Window width. */