From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1726) id 902AB3857BB2; Fri, 27 Jan 2023 16:25:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 902AB3857BB2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1674836718; bh=PladVkLJCG9yAuaNpXiKuwb/jUl3qBGElFBziBMJhic=; h=From:To:Subject:Date:From; b=gX6oH0CSHEPWPWI8TQADAJhCIPfkT5igBj6IZRPWtdrZx31frTOUIhcfAy0GcoWCt O6SGx/qwlSk88MipRFYach8sXikYP1kt1Wr+xegfE+v5lEOXPnpbcXOHgcZw9skBhD cTSejT2hGnHFg52/RvRcu+fSUVrnOqRThGjuc2+c= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Andrew Burgess To: gdb-cvs@sourceware.org Subject: [binutils-gdb] gdb/tui: make m_horizontal_offset private X-Act-Checkin: binutils-gdb X-Git-Author: Andrew Burgess X-Git-Refname: refs/heads/master X-Git-Oldrev: a4f8f2902704e47b2e70a95995248a54d6df8beb X-Git-Newrev: 9bea9aa7d29330783541861d7498d51fbb0002c7 Message-Id: <20230127162518.902AB3857BB2@sourceware.org> Date: Fri, 27 Jan 2023 16:25:18 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D9bea9aa7d293= 30783541861d7498d51fbb0002c7 commit 9bea9aa7d29330783541861d7498d51fbb0002c7 Author: Andrew Burgess Date: Wed Jan 4 17:07:47 2023 +0000 gdb/tui: make m_horizontal_offset private =20 I noticed that tui_source_window_base::m_horizontal_offset was protected, but could be made private, so lets do that. =20 This makes more sense in the context of a later commit where I plan to add another member variable that is similar to m_horizontal_offset. The new member variable could also be private. =20 So I had to choose, place the new member variable next to m_horizontal_offset making it protected, but grouping similar variables together, or make m_horizontal_offset private, and then add the new variable as private too. =20 I chose to make m_horizontal_offset private, which is this commit. =20 There should be no user visible changes after this commit. Diff: --- gdb/tui/tui-winsource.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gdb/tui/tui-winsource.h b/gdb/tui/tui-winsource.h index 7d6d64d35c4..bf0ca96c09b 100644 --- a/gdb/tui/tui-winsource.h +++ b/gdb/tui/tui-winsource.h @@ -124,8 +124,7 @@ protected: /* Redraw the complete line of a source or disassembly window. */ void show_source_line (int lineno); =20 - /* Used for horizontal scroll. */ - int m_horizontal_offset =3D 0; + /* Where to start generating content from. */ struct tui_line_or_address m_start_line_or_addr; =20 /* Architecture associated with code at this location. */ @@ -179,6 +178,9 @@ public: =20 private: =20 + /* Used for horizontal scroll. */ + int m_horizontal_offset =3D 0; + void show_source_content (); =20 /* Called when the user "set style enabled" setting is changed. */