public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
From: Tom Tromey <tromey@sourceware.org>
To: gdb-cvs@sourceware.org
Subject: [binutils-gdb] Remove has_locator method
Date: Wed, 17 Jul 2019 18:40:00 -0000	[thread overview]
Message-ID: <20190717184043.88765.qmail@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=0fcd37117e94e5b9bf5f4aaa4dccc8038b38398e

commit 0fcd37117e94e5b9bf5f4aaa4dccc8038b38398e
Author: Tom Tromey <tom@tromey.com>
Date:   Mon Jul 1 14:44:29 2019 -0600

    Remove has_locator method
    
    Earlier changes made it obvious that the has_locator method can only
    be called for source/disassembly windows.  Because the only reference
    to this now occurs in methods on this object, we can remove the
    has_locator method entirely, in favor of using the member directly.
    
    gdb/ChangeLog
    2019-07-17  Tom Tromey  <tom@tromey.com>
    
    	* tui/tui-win.c (tui_source_window_base::set_new_height)
    	(tui_source_window_base::do_make_visible_with_new_height): Use
    	m_has_locator field directly.
    	* tui/tui-data.h (struct tui_win_info) <has_locator>: Remove
    	method.
    	(struct tui_source_window_base) <has_locator>: Likewise.

Diff:
---
 gdb/ChangeLog      |  9 +++++++++
 gdb/tui/tui-data.h | 12 ------------
 gdb/tui/tui-win.c  |  4 ++--
 3 files changed, 11 insertions(+), 14 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index f6d464f..5a3d6c5 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,14 @@
 2019-07-17  Tom Tromey  <tom@tromey.com>
 
+	* tui/tui-win.c (tui_source_window_base::set_new_height)
+	(tui_source_window_base::do_make_visible_with_new_height): Use
+	m_has_locator field directly.
+	* tui/tui-data.h (struct tui_win_info) <has_locator>: Remove
+	method.
+	(struct tui_source_window_base) <has_locator>: Likewise.
+
+2019-07-17  Tom Tromey  <tom@tromey.com>
+
 	* tui/tui-wingeneral.h (tui_make_visible, tui_make_invisible):
 	Don't declare.
 	* tui/tui-wingeneral.c (tui_make_visible, tui_make_invisible):
diff --git a/gdb/tui/tui-data.h b/gdb/tui/tui-data.h
index e177300..cfe2460 100644
--- a/gdb/tui/tui-data.h
+++ b/gdb/tui/tui-data.h
@@ -295,12 +295,6 @@ public:
   /* Clear the pertinent detail in the window.  */
   virtual void clear_detail () = 0;
 
-  /* Return true if this window has the locator.  */
-  virtual bool has_locator () const
-  {
-    return false;
-  }
-
   /* Called after all the TUI windows are refreshed, to let this
      window have a chance to update itself further.  */
   virtual void refresh_all ()
@@ -368,12 +362,6 @@ public:
 
   void clear_detail () override;
 
-  /* Return true if this window has the locator.  */
-  bool has_locator () const override
-  {
-    return m_has_locator;
-  }
-
   void make_visible (bool visible) override;
   void refresh_window () override;
   void refresh_all () override;
diff --git a/gdb/tui/tui-win.c b/gdb/tui/tui-win.c
index c92a706..2fb757a 100644
--- a/gdb/tui/tui-win.c
+++ b/gdb/tui/tui-win.c
@@ -1235,7 +1235,7 @@ tui_source_window_base::set_new_height (int height)
     execution_info->viewport_height = height;
   execution_info->viewport_height--;
 
-  if (has_locator ())
+  if (m_has_locator)
     {
       tui_locator_window *gen_win_info = tui_locator_win_info_ptr ();
       gen_win_info->make_visible (false);
@@ -1324,7 +1324,7 @@ tui_source_window_base::do_make_visible_with_new_height ()
 	}
       tui_update_source_window (this, gdbarch, s, line, TRUE);
     }
-  if (has_locator ())
+  if (m_has_locator)
     {
       tui_locator_win_info_ptr ()->make_visible (true);
       tui_show_locator_content ();


                 reply	other threads:[~2019-07-17 18:40 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20190717184043.88765.qmail@sourceware.org \
    --to=tromey@sourceware.org \
    --cc=gdb-cvs@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).