aboutsummaryrefslogtreecommitdiff
path: root/gdb/tui
diff options
context:
space:
mode:
authorAndrew Burgess <aburgess@redhat.com>2023-01-04 17:07:47 +0000
committerAndrew Burgess <aburgess@redhat.com>2023-01-27 16:20:10 +0000
commit9bea9aa7d29330783541861d7498d51fbb0002c7 (patch)
tree318a9a5b81e71939a2b797159e25d2ee499ed114 /gdb/tui
parenta4f8f2902704e47b2e70a95995248a54d6df8beb (diff)
downloadgdb-9bea9aa7d29330783541861d7498d51fbb0002c7.zip
gdb-9bea9aa7d29330783541861d7498d51fbb0002c7.tar.gz
gdb-9bea9aa7d29330783541861d7498d51fbb0002c7.tar.bz2
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.
Diffstat (limited to 'gdb/tui')
-rw-r--r--gdb/tui/tui-winsource.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/gdb/tui/tui-winsource.h b/gdb/tui/tui-winsource.h
index 7d6d64d..bf0ca96 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. */