This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 11/15] Minor simplification in tui_default_win_viewport_height
- From: Tom Tromey <tom at tromey dot com>
- To: gdb-patches at sourceware dot org
- Cc: Tom Tromey <tom at tromey dot com>
- Date: Wed, 14 Aug 2019 10:21:28 -0600
- Subject: [PATCH 11/15] Minor simplification in tui_default_win_viewport_height
- References: <20190814162132.31424-1-tom@tromey.com>
tui_default_win_viewport_height doesn't need to look at tui_win_list;
it can simply check the type directly.
2019-08-14 Tom Tromey <tom@tromey.com>
* tui/tui-layout.c (tui_default_win_viewport_height): Don't
examine tui_win_list.
---
gdb/ChangeLog | 5 +++++
gdb/tui/tui-layout.c | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/gdb/tui/tui-layout.c b/gdb/tui/tui-layout.c
index c2abcf4429d..d10c9a043d6 100644
--- a/gdb/tui/tui-layout.c
+++ b/gdb/tui/tui-layout.c
@@ -304,7 +304,7 @@ tui_default_win_viewport_height (enum tui_win_type type,
h = tui_default_win_height (type, layout);
- if (tui_win_list[type] == TUI_CMD_WIN)
+ if (type == CMD_WIN)
h -= 1;
else
h -= 2;
--
2.17.2