From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22573 invoked by alias); 30 Apr 2018 14:07:38 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 22456 invoked by uid 89); 30 Apr 2018 14:07:37 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.8 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=encapsulate X-HELO: gateway21.websitewelcome.com Received: from gateway21.websitewelcome.com (HELO gateway21.websitewelcome.com) (192.185.45.155) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 30 Apr 2018 14:07:36 +0000 Received: from cm11.websitewelcome.com (cm11.websitewelcome.com [100.42.49.5]) by gateway21.websitewelcome.com (Postfix) with ESMTP id B4AD8400C7870 for ; Mon, 30 Apr 2018 09:07:34 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id D9SofOxzuA3CSD9SofTovM; Mon, 30 Apr 2018 09:07:34 -0500 X-Authority-Reason: nr=8 Received: from 97-122-176-117.hlrn.qwest.net ([97.122.176.117]:38138 helo=bapiya.Home) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89_1) (envelope-from ) id 1fD9So-003cQs-FK; Mon, 30 Apr 2018 09:07:34 -0500 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [RFA 1/6] Make do_is_mi_like_p const. Date: Mon, 30 Apr 2018 14:07:00 -0000 Message-Id: <20180430140732.21601-2-tom@tromey.com> In-Reply-To: <20180430140732.21601-1-tom@tromey.com> References: <20180430140732.21601-1-tom@tromey.com> X-BWhitelist: no X-Source-L: No X-Exim-ID: 1fD9So-003cQs-FK X-Source-Sender: 97-122-176-117.hlrn.qwest.net (bapiya.Home) [97.122.176.117]:38138 X-Source-Auth: tom+tromey.com X-Email-Count: 2 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-SW-Source: 2018-04/txt/msg00626.txt.bz2 This changes ui_out to make is_mi_like_p and do_is_mi_like_p "const". ChangeLog 2018-04-29 Tom Tromey * ui-out.c: Update. * cli-out.h (cli_ui_out::do_is_mi_like_p): Update. * ui-out.h (ui_out::is_mi_like_p): Now const. (ui_out::do_is_mi_like_p): Now const. * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update. --- gdb/ChangeLog | 8 ++++++++ gdb/mi/mi-out.h | 2 +- gdb/ui-out.c | 2 +- gdb/ui-out.h | 4 ++-- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/gdb/mi/mi-out.h b/gdb/mi/mi-out.h index 7389071dcf..89ff88cd32 100644 --- a/gdb/mi/mi-out.h +++ b/gdb/mi/mi-out.h @@ -69,7 +69,7 @@ protected: virtual void do_flush () override; virtual void do_redirect (struct ui_file *outstream) override; - virtual bool do_is_mi_like_p () override + virtual bool do_is_mi_like_p () const override { return true; } private: diff --git a/gdb/ui-out.c b/gdb/ui-out.c index 3648815090..ebe0285b49 100644 --- a/gdb/ui-out.c +++ b/gdb/ui-out.c @@ -581,7 +581,7 @@ ui_out::test_flags (ui_out_flags mask) } bool -ui_out::is_mi_like_p () +ui_out::is_mi_like_p () const { return do_is_mi_like_p (); } diff --git a/gdb/ui-out.h b/gdb/ui-out.h index a415100d7e..81e2e0b20d 100644 --- a/gdb/ui-out.h +++ b/gdb/ui-out.h @@ -119,7 +119,7 @@ class ui_out a hack to encapsulate that test. Once GDB manages to separate the CLI/MI from the core of GDB the problem should just go away .... */ - bool is_mi_like_p (); + bool is_mi_like_p () const; bool query_table_field (int colno, int *width, int *alignment, const char **col_name); @@ -157,7 +157,7 @@ class ui_out /* Set as not MI-like by default. It is overridden in subclasses if necessary. */ - virtual bool do_is_mi_like_p () + virtual bool do_is_mi_like_p () const { return false; } private: -- 2.13.6