Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tom@tromey.com>
Subject: [RFA 1/6] Make do_is_mi_like_p const.
Date: Mon, 30 Apr 2018 14:07:00 -0000	[thread overview]
Message-ID: <20180430140732.21601-2-tom@tromey.com> (raw)
In-Reply-To: <20180430140732.21601-1-tom@tromey.com>

This changes ui_out to make is_mi_like_p and do_is_mi_like_p "const".

ChangeLog
2018-04-29  Tom Tromey  <tom@tromey.com>

	* 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


  parent reply	other threads:[~2018-04-30 14:07 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-30 14:07 [RFA 0/6] Remove some uses of is_mi_like_p Tom Tromey
2018-04-30 14:07 ` [RFA 6/6] Remove a use of is_mi_like_p from darwin-nat-info.c Tom Tromey
2018-04-30 14:07 ` [RFA 5/6] Remove some is_mi_like_p from breakpoint code Tom Tromey
2018-04-30 14:07 ` [RFA 3/6] Remove some uses of is_mi_like_p from spu-tdep.c Tom Tromey
2018-04-30 14:07 ` Tom Tromey [this message]
2018-04-30 14:07 ` [RFA 4/6] Remove a use of is_mi_like_p from tracepoint.c Tom Tromey
2018-04-30 14:07 ` [RFA 2/6] Remove some uses of is_mi_like_p from py-framefilter.c Tom Tromey
2018-04-30 18:36 ` [RFA 0/6] Remove some uses of is_mi_like_p Pedro Alves
2018-04-30 18:52   ` Tom Tromey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180430140732.21601-2-tom@tromey.com \
    --to=tom@tromey.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox