diff options
author | Tom Tromey <tom@tromey.com> | 2023-12-17 10:35:19 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2024-02-08 12:15:39 -0700 |
commit | 1a2596729376be777bb1d00889057845e26f9dc3 (patch) | |
tree | e383049834120fca38e447b5265f213dc9bbffe4 /gdb/tui | |
parent | 32ed168c4d0aaa7e3e04eed0742c03df947719c6 (diff) | |
download | fsf-binutils-gdb-1a2596729376be777bb1d00889057845e26f9dc3.zip fsf-binutils-gdb-1a2596729376be777bb1d00889057845e26f9dc3.tar.gz fsf-binutils-gdb-1a2596729376be777bb1d00889057845e26f9dc3.tar.bz2 |
Minor C++ cleanups in tui-regs.c
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>
Diffstat (limited to 'gdb/tui')
-rw-r--r-- | gdb/tui/tui-regs.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/gdb/tui/tui-regs.c b/gdb/tui/tui-regs.c index 590e9e8..f1c3e2e 100644 --- a/gdb/tui/tui-regs.c +++ b/gdb/tui/tui-regs.c @@ -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, |