This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] Remove a cleanup from call_function_by_hand_dummy
- From: Tom Tromey <tom at tromey dot com>
- To: Simon Marchi <simon dot marchi at polymtl dot ca>
- Cc: Tom Tromey <tom at tromey dot com>, gdb-patches at sourceware dot org
- Date: Sat, 17 Feb 2018 13:47:14 -0700
- Subject: Re: [RFA] Remove a cleanup from call_function_by_hand_dummy
- Authentication-results: sourceware.org; auth=none
- References: <20180217161104.4909-1-tom@tromey.com> <bc14a7c64b3f1d90bdea0d14734bed23@polymtl.ca>
>>>>> "Simon" == Simon Marchi <simon.marchi@polymtl.ca> 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