From cb24623460fe3e68794b79b79b0dbd5e62598d85 Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Tue, 19 Mar 2019 18:08:27 +0000 Subject: Add comments describing tui_ui_out and its fields, cleanup a bit This commit add comments describing tui_ui_out and its fields, and cleans up the code a little bit. Also switch to using in-class initialization so that the initial values can be seen alongside the comments. I see no reason for initializing m_line as -1 instead of 0, since all the checks in the .c file are of the form "> 0". AFAICS there's no practical difference between -1 and 0. So it seems simpler to initialize it as 0. There's a bit of redundancy in tui_ui_out::do_field_string, which is fixed by this commit. gdb/ChangeLog: 2019-03-19 Pedro Alves * tui/tui-out.c (tui_ui_out::do_field_string): Simplify. (tui_ui_out::do_text): Add comments. Reset M_LINE to 0 instead of to -1. Fix TABs vs spaces. (tui_ui_out::tui_ui_out): Don't initialize fields here. * tui/tui-out.h (tui_ui_out) Add intro comments. : In-class initialize, and add describing comment. --- gdb/ChangeLog | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'gdb/ChangeLog') diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 7b896ed..c170fe4 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,13 @@ +2019-03-19 Pedro Alves + + * tui/tui-out.c (tui_ui_out::do_field_string): Simplify. + (tui_ui_out::do_text): Add comments. Reset M_LINE to 0 instead of + to -1. Fix TABs vs spaces. + (tui_ui_out::tui_ui_out): Don't initialize fields here. + * tui/tui-out.h (tui_ui_out) Add intro comments. + : In-class initialize, and add describing + comment. + 2019-03-18 Alan Hayward * arm-linux-nat.c (arm_linux_insert_hw_breakpoint1): Fix -- cgit v1.1