From: Andrew Burgess Date: Wed, 4 Jan 2023 17:07:47 +0000 (+0000) Subject: gdb/tui: make m_horizontal_offset private X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9bea9aa7d29330783541861d7498d51fbb0002c7;p=binutils-gdb.git gdb/tui: make m_horizontal_offset private I noticed that tui_source_window_base::m_horizontal_offset was protected, but could be made private, so lets do that. 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. 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. I chose to make m_horizontal_offset private, which is this commit. There should be no user visible changes after this commit. --- 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); - /* Used for horizontal scroll. */ - int m_horizontal_offset = 0; + /* Where to start generating content from. */ struct tui_line_or_address m_start_line_or_addr; /* Architecture associated with code at this location. */ @@ -179,6 +178,9 @@ public: private: + /* Used for horizontal scroll. */ + int m_horizontal_offset = 0; + void show_source_content (); /* Called when the user "set style enabled" setting is changed. */