From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id CDJEOwZjDWLDRAAAWB0awg (envelope-from ) for ; Wed, 16 Feb 2022 15:48:06 -0500 Received: by simark.ca (Postfix, from userid 112) id EFEE11F3C9; Wed, 16 Feb 2022 15:48:06 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.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 7D8231EA69 for ; Wed, 16 Feb 2022 15:48:06 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0D10B3857C67 for ; Wed, 16 Feb 2022 20:48:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0D10B3857C67 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1645044486; bh=nl/fIfAo3nZvv8pqbHPpvndgDrgptWgopLkH/idPgaU=; h=To:Subject:References:Date:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=UrTLX/nk7A+TzxSE1iD+32t7O++/HAELwikFSNxJkkyTBW5INysFxx0YPTQ9ZTC4b SpYZOEINIp1UEsOIRQRXOL0GLDtiKOgbsS6FmH+VDgWPgKBVyBZKxTw8AaS6Fz7izK s5KNCuowB4pDYTyrdDWBbVuyrGbShiucbWXJKH7U= Received: from mail-io1-xd2c.google.com (mail-io1-xd2c.google.com [IPv6:2607:f8b0:4864:20::d2c]) by sourceware.org (Postfix) with ESMTPS id 94CBE385840E for ; Wed, 16 Feb 2022 20:47:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 94CBE385840E Received: by mail-io1-xd2c.google.com with SMTP id y20so1256016iod.1 for ; Wed, 16 Feb 2022 12:47:47 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=nl/fIfAo3nZvv8pqbHPpvndgDrgptWgopLkH/idPgaU=; b=u6W9nOCHq9TiWe4ArMZvcO2BEXuQtgOzPiwEQJrGcPXZXATcLrAI2zH83rzjiyPBSJ tJD3Xiar8U1ZogRRoabq/DLxSKcAdcZUzXSoqGrR2dblkoMQApZ241U1vy5AfMZJ/Bo9 YjKi5d5iRJG7d88se+QcoFS4B7y5/NiHrKP2cYDfCmjo35ZLuAwqltjGaqJOnZxfQ16N 250GjkXo0KGK7RZ9ruDdx/FPa4mfHZDtZHxZD/MiAjKHtW3iaab1ePC3ocm2OxXHcpyw WoOZ6+d6Qy3nu1u6hFFj55NsucRxZWGQQT62UBoLSGGsTb/hXV6eZzIDZDmwVU90cID+ eC7g== X-Gm-Message-State: AOAM5326uNyVpE3Qi0DmJQrkBCiQOhpCM2CakGI3xN/n/pR1BxAByfKV LZPrR1vmtz2VNopn5oklHSdw/Q== X-Google-Smtp-Source: ABdhPJz5oV+6CXyVyPlB3wmmZU/ryiE46q6MOylXhjf4k3A1HdF6qbtU8H5kUNtW0+cfYXcXYWLPhQ== X-Received: by 2002:a05:6638:1453:b0:308:eafa:41c with SMTP id l19-20020a056638145300b00308eafa041cmr2933687jad.30.1645044467071; Wed, 16 Feb 2022 12:47:47 -0800 (PST) Received: from murgatroyd (97-122-95-113.hlrn.qwest.net. [97.122.95.113]) by smtp.gmail.com with ESMTPSA id q9sm521290ilo.56.2022.02.16.12.47.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Feb 2022 12:47:46 -0800 (PST) To: Simon Marchi Subject: Re: [PATCH] Add initializers to bound_minimal_symbol References: <20220208204245.2186900-1-tromey@adacore.com> <877d9wrvb7.fsf@tromey.com> <4248fa34-619d-5a35-4bd4-9c566407cc0d@polymtl.ca> X-Attribution: Tom Date: Wed, 16 Feb 2022 13:47:45 -0700 In-Reply-To: <4248fa34-619d-5a35-4bd4-9c566407cc0d@polymtl.ca> (Simon Marchi's message of "Wed, 16 Feb 2022 10:29:40 -0500") Message-ID: <87tucyr11q.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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: Tom Tromey via Gdb-patches Reply-To: Tom Tromey Cc: gdb-patches@sourceware.org, Tom Tromey Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" >>>>> "Simon" == Simon Marchi writes: Simon> I would just suggest changing the call in add_minsym like so: Simon> - struct bound_minimal_symbol mo = {minsym, objfile}; Simon> - msyms->push_back (mo); Simon> + msyms->emplace_back (minsym, objfile); Simon> This just avoids constructing the object and then copying it. I did this and also made some other more cosmetic changes. I sent the new patch to the list. Tom