From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 64514 invoked by alias); 25 Jan 2017 18:41:13 -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 64498 invoked by uid 89); 25 Jan 2017 18:41:12 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-5.1 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=H*f:sk:0a004b5, H*i:sk:8cee3d1, H*f:sk:8cee3d1, H*MI:sk:8cee3d1 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 25 Jan 2017 18:41:10 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 528493DE3F; Wed, 25 Jan 2017 18:41:10 +0000 (UTC) Received: from [127.0.0.1] (ovpn04.gateway.prod.ext.phx2.redhat.com [10.5.9.4]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v0PIf8bQ008392; Wed, 25 Jan 2017 13:41:09 -0500 Subject: Re: [PATCH v2 5/5] Eliminate make_cleanup_ui_file_delete / make ui_file a class hierarchy To: Simon Marchi References: <1484617147-2506-1-git-send-email-palves@redhat.com> <1484617147-2506-6-git-send-email-palves@redhat.com> <5533317a1fdb2e5f36e64731aef84993@polymtl.ca> <4a6cce94-1533-36e9-6015-330e2e014a98@redhat.com> <558e1e55-23eb-716e-8117-c18d7bded7b8@redhat.com> <91ab941736dd82a711868ea56651c20d@polymtl.ca> <0a004b52-a388-e7ec-fe3e-ccac3e31f7b2@redhat.com> <8cee3d1e0a4219a8eeaacf07a8841f5b@polymtl.ca> Cc: gdb-patches@sourceware.org From: Pedro Alves Message-ID: Date: Wed, 25 Jan 2017 18:41:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <8cee3d1e0a4219a8eeaacf07a8841f5b@polymtl.ca> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2017-01/txt/msg00552.txt.bz2 On 01/25/2017 06:39 PM, Simon Marchi wrote: > On 2017-01-25 13:28, Pedro Alves wrote: >>> If it had been "to std::move the string contents out..." it might have >>> been a bit clearer, I'm not entirely sure. >> >> That would read a bit odd to me, since "std::move" itself >> does nothing, it's just a cast. > > I think it's obvious that if you're going to use std::move, it's to move > the value somewhere, not just "std::move (buf);" by itself. But if you > want to go with the more explicit comment below, it's fine with me. It > shows the use case more clearly. OK, I'll go with the extended comment then (...) >> + string_file buf; >> + buf.printf (...."); >> + buf.printf (...."); (...) with the spurious " removed ... Thanks, Pedro Alves