From 61c33f105c71d27386e5b3cc6e1c5f71efe7ed01 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Tue, 12 Nov 2019 17:26:50 -0700 Subject: Change tui_source_window_base::set_contents to return bool This changes tui_source_window_base::set_contents to return bool, rather than tui_status. It also changes one implementation of set_contents to use early returns rather than a variable, which IMO makes it easier to follow. gdb/ChangeLog 2019-12-20 Tom Tromey * tui/tui-winsource.h (struct tui_source_window_base) : Return bool. * tui/tui-winsource.c (tui_source_window_base::update_source_window_as_is): Update. * tui/tui-source.h (struct tui_source_window) : Return bool. * tui/tui-source.c (tui_source_window::set_contents): Return bool. Simplify. * tui/tui-disasm.h (struct tui_disasm_window) : Return bool. * tui/tui-disasm.c (tui_disasm_window::set_contents): Return bool. Change-Id: I8c5212400cd7aadf35760c22d5344cd3b9435674 --- gdb/tui/tui-winsource.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'gdb/tui/tui-winsource.h') diff --git a/gdb/tui/tui-winsource.h b/gdb/tui/tui-winsource.h index 1ba967c..1991d04 100644 --- a/gdb/tui/tui-winsource.h +++ b/gdb/tui/tui-winsource.h @@ -87,10 +87,9 @@ protected: void rerender () override; - virtual enum tui_status set_contents - (struct gdbarch *gdbarch, - struct symtab *s, - struct tui_line_or_address line_or_addr) = 0; + virtual bool set_contents (struct gdbarch *gdbarch, + struct symtab *s, + struct tui_line_or_address line_or_addr) = 0; public: -- cgit v1.1