From: Tom Tromey Date: Wed, 24 Apr 2024 22:05:25 +0000 (-0600) Subject: Remove tui_refresh_all X-Git-Tag: gdb-15-branchpoint~130 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=04e63f26ba5f661fe28503e9aeb99fbdc5ea9a7b;p=thirdparty%2Fbinutils-gdb.git Remove tui_refresh_all This removes tui_refresh_all. There is only a single caller, tui_refresh_all_win, so inlining the code there simplifies gdb at no cost. Reviewed-By: Alexandra Petlanova Hajkova Approved-By: Andrew Burgess --- diff --git a/gdb/tui/tui-win.c b/gdb/tui/tui-win.c index 8f4c7ecc595..85b62321ca9 100644 --- a/gdb/tui/tui-win.c +++ b/gdb/tui/tui-win.c @@ -479,7 +479,11 @@ void tui_refresh_all_win (void) { clearok (curscr, TRUE); - tui_refresh_all (); + for (tui_win_info *win_info : all_tui_windows ()) + { + if (win_info->is_visible ()) + win_info->refresh_window (); + } } void diff --git a/gdb/tui/tui-wingeneral.c b/gdb/tui/tui-wingeneral.c index e4d7a688ee3..6260d08cd3d 100644 --- a/gdb/tui/tui-wingeneral.c +++ b/gdb/tui/tui-wingeneral.c @@ -189,15 +189,3 @@ tui_win_info::make_visible (bool visible) else handle.reset (nullptr); } - -/* Function to refresh all the windows currently displayed. */ - -void -tui_refresh_all () -{ - for (tui_win_info *win_info : all_tui_windows ()) - { - if (win_info->is_visible ()) - win_info->refresh_window (); - } -} diff --git a/gdb/tui/tui-wingeneral.h b/gdb/tui/tui-wingeneral.h index 6bee433689e..652cef95733 100644 --- a/gdb/tui/tui-wingeneral.h +++ b/gdb/tui/tui-wingeneral.h @@ -28,7 +28,6 @@ struct tui_win_info; extern void tui_unhighlight_win (struct tui_win_info *); extern void tui_highlight_win (struct tui_win_info *); -extern void tui_refresh_all (); /* An RAII class that suppresses output on construction (calling wnoutrefresh on the existing windows), and then flushes the output