From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id E2E343858C62 for ; Wed, 25 Jan 2023 12:09:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E2E343858C62 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1674648547; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jcdgqCCodrkrGvXu/A1dTmdurdyIuJ6uFOGqjP8e6Zc=; b=KdK8uPLnqI7Lc/22uaZ38j1G4ZUyk0oagyiS2jBNTUh5aRGYGzb5HilTliR+lHwnKaQuTm iCQ5FBI1pEKBo+uUgmBZTmnV222wcUEQY2rd6tz4mNbQAnpUhpTGYrW5te14jrwVQQIJYE /VkDnL1Y65vQ89zdF4z0ZUKlo8sFhrA= Received: from mail-qt1-f200.google.com (mail-qt1-f200.google.com [209.85.160.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-205-XbBcfmC9MEGuaSwBHJimnA-1; Wed, 25 Jan 2023 07:09:05 -0500 X-MC-Unique: XbBcfmC9MEGuaSwBHJimnA-1 Received: by mail-qt1-f200.google.com with SMTP id o16-20020ac841d0000000b003b689580725so7534898qtm.22 for ; Wed, 25 Jan 2023 04:09:04 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jcdgqCCodrkrGvXu/A1dTmdurdyIuJ6uFOGqjP8e6Zc=; b=PA4gwiee+D2z+W8uhg1WjRK/GcnIoWl4Xnob0dtXXrAAt4V96xCdkWLwBl2tQesob9 rBsWcbeE8ktcuFq/Zku5ndGAtlUg8X4bhuE3l9gnNxWIQ8sIMl0GtIz6wmWpluKcadnJ fx6RcLln8hA+ScywUZcmBTrCAoohNCmCS8XpBDqXU9Ul2oEhijLFb3sMSCmLJcFkTzmw fCOYYX98eB6VXHQ3OQqX0oNGtXRe2VpvhfwWVz522IkIA45940L1OfIidV+ToqAoBBaq X9Hr9REaJfpeRZiEuTEcxa2uqUBhNbOq5IqQOwMoZ9dSud1uZXb2Tx+Ki7WyndDTJ03q E7sw== X-Gm-Message-State: AFqh2kqdgYSru6+6ciiuYJhb3pDt1iI0fMWLCZGr/lLzOMs0UoHxFTcN 3XmN+nP7WspCyS2z5LdEFAYxAC83hu1VY/j0jR/B0BqP1Z/hPsCcFb4XWN250gOBZtEHViF2bl5 YyCIWx4KJqilPxgJwmZC1A63FNcrg92Jnxweq23iXcmcqFkaqz2KyFc+B2hMeZLQikGDaKVeGPA == X-Received: by 2002:ac8:425a:0:b0:3b6:43ae:d5a3 with SMTP id r26-20020ac8425a000000b003b643aed5a3mr37553102qtm.26.1674648543582; Wed, 25 Jan 2023 04:09:03 -0800 (PST) X-Google-Smtp-Source: AMrXdXtmwy7U1yaYsViByRt39Lcr5LQ7U6jN8TClY7YQg3wVp+m3Y0mcaRQcyjnsL9pfJa1/AY0J9w== X-Received: by 2002:ac8:425a:0:b0:3b6:43ae:d5a3 with SMTP id r26-20020ac8425a000000b003b643aed5a3mr37553079qtm.26.1674648543291; Wed, 25 Jan 2023 04:09:03 -0800 (PST) Received: from localhost (95.72.115.87.dyn.plus.net. [87.115.72.95]) by smtp.gmail.com with ESMTPSA id x25-20020ac84d59000000b003b5bc7a4512sm3195279qtv.26.2023.01.25.04.09.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Jan 2023 04:09:03 -0800 (PST) From: Andrew Burgess To: gdb-patches@sourceware.org Cc: Andrew Burgess Subject: [PATCHv2 4/8] gdb/tui: make m_horizontal_offset private Date: Wed, 25 Jan 2023 12:08:44 +0000 Message-Id: <083a8c7747c5d75c31eb95011b113517d1974b92.1674648473.git.aburgess@redhat.com> X-Mailer: git-send-email 2.25.4 In-Reply-To: References: MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-Spam-Status: No, score=-11.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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. --- 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 @@ struct tui_source_window_base : public tui_win_info /* 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 @@ struct tui_source_window_base : public tui_win_info private: + /* Used for horizontal scroll. */ + int m_horizontal_offset = 0; + void show_source_content (); /* Called when the user "set style enabled" setting is changed. */ -- 2.25.4