From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id wX2sJfbxAWBvSAAAWB0awg (envelope-from ) for ; Fri, 15 Jan 2021 14:50:14 -0500 Received: by simark.ca (Postfix, from userid 112) id 881771EF80; Fri, 15 Jan 2021 14:50:14 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id DF5B41E590 for ; Fri, 15 Jan 2021 14:50:13 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2E7CD3987C2D; Fri, 15 Jan 2021 19:50:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2E7CD3987C2D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1610740213; bh=iT4R7ocLh7zft6eHp0jXpGQGVsFA0qFhr+TRx7942Cw=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=HE0Hv4r5Bw/oDyPYymkAU6tZuxhEeMKSP1S1J5vrLicFIEHDsQ0kG0SHXM23KsAFX 0iC6XP7g+mHtJSwHMrI6ppT56i5z3RGaWNI1BPaiXeASY2T8QAjMC0n3qg06Ko4ziT VxTlmNJDxdnW+WW05J0iOcJv0+iyOgkkHbJEZXx4= Received: from beryx.lancelotsix.com (beryx.lancelotsix.com [IPv6:2001:41d0:401:3000::1ab3]) by sourceware.org (Postfix) with ESMTPS id A57473987C26 for ; Fri, 15 Jan 2021 19:50:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org A57473987C26 Received: from Plymouth.lan (unknown [IPv6:2a02:390:8443:0:cdf3:9065:681d:ebc4]) by beryx.lancelotsix.com (Postfix) with ESMTPSA id 765172E071; Fri, 15 Jan 2021 20:50:05 +0100 (CET) To: gdb-patches@sourceware.org Subject: [PATCH] use DISABLE_COPY_AND_ASSIGN in switch_thru_all_uis Date: Fri, 15 Jan 2021 19:49:50 +0000 Message-Id: <20210115194950.16882-1-lsix@lancelotsix.com> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.11 (beryx.lancelotsix.com [0.0.0.0]); Fri, 15 Jan 2021 20:50:05 +0100 (CET) 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: , From: Lancelot SIX via Gdb-patches Reply-To: Lancelot SIX Cc: Lancelot SIX Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" In switch_thru_all_uis, a pre-c++11 way of removing copy constructor and assignment operator is used. This patch uses the DISABLE_COPY_AND_ASSIGN macro which does the right thing for pre and post c++11. gdb/Changelog: * top.h (switch_thru_all_uis): Use DISABLE_COPY_AND_ASSIGN. --- gdb/top.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/gdb/top.h b/gdb/top.h index a31b19ae954..d912ea97190 100644 --- a/gdb/top.h +++ b/gdb/top.h @@ -190,10 +190,7 @@ class switch_thru_all_uis private: - /* No need for these. They are intentionally not defined - anywhere. */ - switch_thru_all_uis &operator= (const switch_thru_all_uis &); - switch_thru_all_uis (const switch_thru_all_uis &); + DISABLE_COPY_AND_ASSIGN (switch_thru_all_uis); /* Used to iterate through the UIs. */ struct ui *m_iter; -- 2.29.2