From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 34792 invoked by alias); 26 Nov 2016 16:22:19 -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 34782 invoked by uid 89); 26 Nov 2016 16:22:19 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_SOFTFAIL autolearn=no version=3.3.2 spammy=HX-PHP-Originating-Script:rcube.php, nesting, our X-HELO: simark.ca Received: from simark.ca (HELO simark.ca) (158.69.221.121) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 26 Nov 2016 16:22:16 +0000 Received: by simark.ca (Postfix, from userid 33) id E6B911E86E; Sat, 26 Nov 2016 11:22:14 -0500 (EST) To: Pedro Alves Subject: Re: [PATCH 16/22] Class-ify ui_out_level X-PHP-Originating-Script: 33:rcube.php MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Sat, 26 Nov 2016 16:22:00 -0000 From: Simon Marchi Cc: gdb-patches@sourceware.org In-Reply-To: References: <20161124152428.24725-1-simon.marchi@polymtl.ca> <20161124152710.25007-16-simon.marchi@polymtl.ca> Message-ID: <82c06e7795f785cdff3090bb38880a2b@polymtl.ca> X-Sender: simon.marchi@polymtl.ca User-Agent: Roundcube Webmail/1.2.2 X-IsSubscribed: yes X-SW-Source: 2016-11/txt/msg00894.txt.bz2 On 2016-11-24 13:41, Pedro Alves wrote: >> -struct ui_out_level >> +/* A level of nesting (either a list or a tuple) in a ui_out output. >> */ >> + >> +class ui_out_level >> +{ >> + public: >> + >> + ui_out_level (ui_out_type type) > > explicit ? I had a discussion about this with Antoine. Is it a good practice to use explicit all the time, and only omit it when there's a good reason why? I initially put it on all the constructors, but decided to drop it after our discussion. >> + : m_type (type), >> + m_field_count (0) >> { >> - /* Count each field; the first element is for non-list fields. >> */ >> - int field_count; >> - /* The type of this level. */ >> - enum ui_out_type type; >> - }; >> + } >> + >> + ui_out_type type (void) const > > "(void)" is not necessary in C++ (and not very idiomatic). > > I saw this in several places in the series. Ok, I fixed all the instances I found.