diff options
author | Tom Tromey <tom@tromey.com> | 2019-10-26 16:00:01 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2019-12-11 15:49:01 -0700 |
commit | fb3184d8ee941e75d61b3d9ce8fcf7028c8877b8 (patch) | |
tree | cce972bd6e7ad46dda877683a4b3619932bff290 /gdb/tui/tui-layout.c | |
parent | dc7ff8a60818f002d7b759210202e0aaabfeebc3 (diff) | |
download | gdb-fb3184d8ee941e75d61b3d9ce8fcf7028c8877b8.zip gdb-fb3184d8ee941e75d61b3d9ce8fcf7028c8877b8.tar.gz gdb-fb3184d8ee941e75d61b3d9ce8fcf7028c8877b8.tar.bz2 |
Remove struct tui_point
struct tui_point does not help very much. It is only used for
storage, and never passed between functions. I think it makes the
code more verbose without any corresponding benefit, so this patch
removes it.
gdb/ChangeLog
2019-12-11 Tom Tromey <tom@tromey.com>
* tui/tui-wingeneral.c (tui_gen_win_info::make_window): Update.
* tui/tui-win.c (tui_adjust_win_heights, tui_resize_all): Update.
* tui/tui-layout.c (tui_gen_win_info::resize): Update.
* tui/tui-data.h (struct tui_point): Remove.
(struct tui_gen_win_info) <origin>: Remove.
<x, y>: New fields.
* tui/tui-command.c (tui_cmd_window::resize): Update.
Change-Id: I3f77920585b9ea9e2b4b189f3f3ae32d4da0c252
Diffstat (limited to 'gdb/tui/tui-layout.c')
-rw-r--r-- | gdb/tui/tui-layout.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/tui/tui-layout.c b/gdb/tui/tui-layout.c index ba0b367..0a7812a 100644 --- a/gdb/tui/tui-layout.c +++ b/gdb/tui/tui-layout.c @@ -468,7 +468,7 @@ tui_gen_win_info::resize (int height_, int width_, int origin_x_, int origin_y_) { if (width == width_ && height == height_ - && origin.x == origin_x_ && origin.y == origin_y_ + && x == origin_x_ && y == origin_y_ && handle != nullptr) return; @@ -478,14 +478,14 @@ tui_gen_win_info::resize (int height_, int width_, viewport_height = height - 2; else viewport_height = 1; - origin.x = origin_x_; - origin.y = origin_y_; + x = origin_x_; + y = origin_y_; if (handle != nullptr) { #ifdef HAVE_WRESIZE wresize (handle.get (), height, width); - mvwin (handle.get (), origin.y, origin.x); + mvwin (handle.get (), y, x); wmove (handle.get (), 0, 0); #else handle.reset (nullptr); |