From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 112051 invoked by alias); 17 Feb 2018 20:47: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 112042 invoked by uid 89); 17 Feb 2018 20:47:18 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=H*RU:192.185.50.108, Hx-spam-relays-external:192.185.50.108 X-HELO: gateway23.websitewelcome.com Received: from gateway23.websitewelcome.com (HELO gateway23.websitewelcome.com) (192.185.50.108) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 17 Feb 2018 20:47:17 +0000 Received: from cm15.websitewelcome.com (cm15.websitewelcome.com [100.42.49.9]) by gateway23.websitewelcome.com (Postfix) with ESMTP id CBACDE115 for ; Sat, 17 Feb 2018 14:47:15 -0600 (CST) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id n9O7erR2cmzEzn9O7esGi0; Sat, 17 Feb 2018 14:47:15 -0600 Received: from 174-29-60-18.hlrn.qwest.net ([174.29.60.18]:53586 helo=bapiya) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89) (envelope-from ) id 1en9O7-003rqx-Ge; Sat, 17 Feb 2018 14:47:15 -0600 From: Tom Tromey To: Simon Marchi Cc: Tom Tromey , gdb-patches@sourceware.org Subject: Re: [RFA] Remove a cleanup from call_function_by_hand_dummy References: <20180217161104.4909-1-tom@tromey.com> Date: Sat, 17 Feb 2018 20:47:00 -0000 In-Reply-To: (Simon Marchi's message of "Sat, 17 Feb 2018 14:23:43 -0500") Message-ID: <87r2pj4a3x.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-BWhitelist: no X-Source-L: No X-Exim-ID: 1en9O7-003rqx-Ge X-Source-Sender: 174-29-60-18.hlrn.qwest.net (bapiya) [174.29.60.18]:53586 X-Source-Auth: tom+tromey.com X-Email-Count: 2 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-SW-Source: 2018-02/txt/msg00231.txt.bz2 >>>>> "Simon" == Simon Marchi writes: Simon> This should probably be resize instead of reserve. When you call Simon> reserve, it doesn't change the actual length of the vector. You could Simon> then use a def_vector to avoid unneeded zero-initialization by the Simon> resize operation. I think I get these mixed up 100% of the time :( What's worse is I read the docs and I guess misunderstood them again. Maybe I should avoid this entirely by using std::copy or something like that. Tom