Tidy tui_delete_win
[deliverable/binutils-gdb.git] / gdb / tui / tui-wingeneral.c
index cfa4a08701cac0e7672e4c51b4a10a6e50adc966..cf8d9fc395937df63d317c0c38a3c94f0d4ffde4 100644 (file)
@@ -45,16 +45,12 @@ tui_gen_win_info::refresh_window ()
 void
 tui_data_window::refresh_window ()
 {
-  if (content_size > 0)
+  if (!regs_content.empty ())
     {
-      for (int i = 0; i < content_size; i++)
+      for (auto &&win : regs_content)
        {
-         struct tui_gen_win_info *data_item_win_ptr;
-
-         data_item_win_ptr = content[i]->which_element.data_window;
-         if (data_item_win_ptr != NULL
-             && data_item_win_ptr->handle != NULL)
-           wrefresh (data_item_win_ptr->handle);
+         if (win != NULL && win->handle != NULL)
+           wrefresh (win->handle);
        }
     }
   else
@@ -67,8 +63,6 @@ tui_delete_win (WINDOW *window)
 {
   if (window != NULL)
     delwin (window);
-
-  return;
 }
 
 
@@ -108,6 +102,7 @@ void
 tui_unhighlight_win (struct tui_win_info *win_info)
 {
   if (win_info != NULL 
+      && win_info->can_highlight
       && win_info->handle != NULL)
     {
       box_win (win_info, NO_HILITE);
@@ -175,7 +170,7 @@ tui_gen_win_info::make_visible (bool visible)
     {
       if (!is_visible)
        {
-         tui_make_window (this, (tui_win_is_auxillary (type)
+         tui_make_window (this, (tui_win_is_auxiliary (type)
                                  ? DONT_BOX_WINDOW : BOX_WINDOW));
          is_visible = true;
        }
@@ -265,7 +260,7 @@ void
 tui_refresh_all (struct tui_win_info **list)
 {
   int type;
-  struct tui_gen_win_info *locator = tui_locator_win_info_ptr ();
+  struct tui_locator_window *locator = tui_locator_win_info_ptr ();
 
   for (type = SRC_WIN; (type < MAX_MAJOR_WINDOWS); type++)
     {
This page took 0.024501 seconds and 4 git commands to generate.