From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.polymtl.ca (smtp.polymtl.ca [132.207.4.11]) by sourceware.org (Postfix) with ESMTPS id 25C1C3858299 for ; Mon, 3 Oct 2022 13:34:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 25C1C3858299 Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id 293DXw7M030764 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 3 Oct 2022 09:34:03 -0400 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 293DXw7M030764 Received: from [10.0.0.11] (unknown [217.28.27.60]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 698951E0D5; Mon, 3 Oct 2022 09:33:58 -0400 (EDT) Message-ID: Date: Mon, 3 Oct 2022 09:33:57 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.0 Subject: Re: [pushed] gdb: constify target_stack::is_pushed Content-Language: en-US To: Tom Tromey , Simon Marchi via Gdb-patches References: <20220929204210.749209-1-simon.marchi@polymtl.ca> <87zgehiyz5.fsf@tromey.com> From: Simon Marchi In-Reply-To: <87zgehiyz5.fsf@tromey.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Mon, 3 Oct 2022 13:33:58 +0000 X-Spam-Status: No, score=-3033.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_PASS, 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 X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Oct 2022 13:34:44 -0000 On 2022-09-29 18:42, Tom Tromey wrote: >>>>>> "Simon" == Simon Marchi via Gdb-patches writes: > > Simon> The target_ops parameters here can be made const. > > Simon> - bool target_is_pushed (target_ops *t) > Simon> + bool target_is_pushed (const target_ops *t) > > Seems like this one could also be const-qualified, like this one is: > > Simon> + bool is_pushed (const target_ops *t) const > Simon> { return at (t->stratum ()) == t; } Thanks, I just pushed a patch that does that. Simon