From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 70054 invoked by alias); 29 Sep 2016 11:55:57 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 70043 invoked by uid 89); 29 Sep 2016 11:55:56 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: paperclip.tbsaunde.org Received: from tbsaunde.org (HELO paperclip.tbsaunde.org) (66.228.47.254) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 29 Sep 2016 11:55:55 +0000 Received: from ball (fanzine.igalia.com [91.117.99.155]) by paperclip.tbsaunde.org (Postfix) with ESMTPSA id C8530C06B; Thu, 29 Sep 2016 11:55:53 +0000 (UTC) Date: Thu, 29 Sep 2016 14:35:00 -0000 From: Trevor Saunders To: Tom Tromey Cc: gdb-patches@sourceware.org Subject: Re: [RFA 17/22] Remove make_cleanup_restore_current_uiout Message-ID: <20160929120428.rwtvs6i4zyzxrvmp@ball> References: <1474949330-4307-1-git-send-email-tom@tromey.com> <1474949330-4307-18-git-send-email-tom@tromey.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1474949330-4307-18-git-send-email-tom@tromey.com> User-Agent: NeoMutt/20160910 (1.7.0) X-SW-Source: 2016-09/txt/msg00411.txt.bz2 > +class scoped_restore_uiout > +{ > + public: > + > + scoped_restore_uiout () : saved (current_uiout) > + { > + } > + > + ~scoped_restore_uiout () > + { > + current_uiout = saved; > + } > + > + private: > + > + // No need for these. They are intentionally not defined anywhere. > + scoped_restore_uiout &operator= (const scoped_restore_uiout &); > + scoped_restore_uiout (const scoped_restore_uiout &); > + > + // The saved ui out. > + struct ui_out *saved; isn't this just scoped_restore ? why do you need a separate class? Trev