]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Minor C++ cleanups in tui-regs.c
authorTom Tromey <tom@tromey.com>
Sun, 17 Dec 2023 17:35:19 +0000 (10:35 -0700)
committerTom Tromey <tom@tromey.com>
Thu, 8 Feb 2024 19:15:39 +0000 (12:15 -0700)
This changes a couple of spots to use nullptr rather than 0, and
changes an int to a bool.

Tested-By: Tom de Vries <tdevries@suse.de>
Reviewed-By: Andrew Burgess <aburgess@redhat.com>
Approved-By: Andrew Burgess <aburgess@redhat.com>
gdb/tui/tui-regs.c

index 590e9e81317e34a1de9a34da68a67dba22e37d01..f1c3e2ed9d497e9c88a5d07c231355cd337faa30 100644 (file)
@@ -173,7 +173,7 @@ tui_data_window::first_reg_element_no_inline (int line_no) const
 void
 tui_data_window::show_registers (const reggroup *group)
 {
-  if (group == 0)
+  if (group == nullptr)
     group = general_reggroup;
 
   if (target_has_registers () && target_has_stack () && target_has_memory ())
@@ -188,7 +188,7 @@ tui_data_window::show_registers (const reggroup *group)
     }
   else
     {
-      m_current_group = 0;
+      m_current_group = nullptr;
       m_regs_content.clear ();
     }
 
@@ -472,9 +472,7 @@ tui_data_window::check_register_values (frame_info_ptr frame)
     {
       for (auto &&data_item_win : m_regs_content)
        {
-         int was_hilighted;
-
-         was_hilighted = data_item_win.highlight;
+         bool was_hilighted = data_item_win.highlight;
 
          tui_get_register (frame, &data_item_win,
                            data_item_win.regno,