From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 109612 invoked by alias); 2 Jan 2019 23:39: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 109601 invoked by uid 89); 2 Jan 2019 23:39:12 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=convinced, yeah X-HELO: gateway30.websitewelcome.com Received: from gateway30.websitewelcome.com (HELO gateway30.websitewelcome.com) (192.185.150.24) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 02 Jan 2019 23:39:11 +0000 Received: from cm13.websitewelcome.com (cm13.websitewelcome.com [100.42.49.6]) by gateway30.websitewelcome.com (Postfix) with ESMTP id DB98E2C17 for ; Wed, 2 Jan 2019 17:39:09 -0600 (CST) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id eq6Pgw9vfYTGMeq6PgikX7; Wed, 02 Jan 2019 17:39:09 -0600 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=WRRJpw53g9gR5RSXK69mWJU0xAHdOMSe1D3T39Nd41w=; b=JPMzJRCb2Om1A5pjAaR5hLA5yK ZauN+5A7/8ZlpzQ/8Q1aN40ZMCsgivar3Sjm5Ve/bSoQMRtw+KG1a3wCHjXyiannHXPjDczcSVXuZ KaqcMWqyGwra8V2SvdirgTZv4; Received: from [50.236.237.38] (port=38470 helo=bapiya) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1geq6P-0013pa-Mu; Wed, 02 Jan 2019 17:39:09 -0600 From: Tom Tromey To: Simon Marchi Cc: Tom Tromey , gdb-patches@sourceware.org Subject: Re: [PATCH] Remove cleanups from linespec.c References: <20190102161836.25927-1-tom@tromey.com> Date: Wed, 02 Jan 2019 23:39:00 -0000 In-Reply-To: (Simon Marchi's message of "Wed, 02 Jan 2019 15:31:17 -0500") Message-ID: <87ftuawrxf.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2019-01/txt/msg00051.txt.bz2 >>>>> "Simon" == Simon Marchi writes: >> + gdb_assert (state->canonical_names[i].suffix != NULL); >> + gdb::unique_xmalloc_ptr holder >> + (state->canonical_names[i].suffix); >> + hold_names.push_back (std::move (holder)); Simon> emplace_back? Thanks, that is much nicer. Simon> I suppose that ideally, these strings would be owned and deleted by Simon> the linespec_state structure itself? Yeah, that's one of the several ways linespec could be improved. I tried once to do a big cleanup of all this, which convinced me that doing lots of tiny steps is a better approach :-) Tom