Re: [PATCH 11/22] Use std::vector for cli_ui_out_data::streams

Simon Marchi
2016-11-26T15:51:22Z

On 2016-11-24 13:40, Pedro Alves wrote:
> On 11/24/2016 03:26 PM, Simon Marchi wrote:
>> @@ -406,13 +404,14 @@ cli_out_set_stream (struct ui_out *uiout, struct
>> ui_file *stream)
>> {
>> cli_out_data *data = (cli_out_data *) ui_out_data (uiout);
>> struct ui_file *old;
>> -
>> - old = VEC_pop (ui_filep, data->streams);
>> - VEC_quick_push (ui_filep, data->streams, stream);
>> +
>> + old = data->streams.back ();
>> + data->streams.pop_back ();
>> + data->streams.push_back (stream);
>
> back() returns a reference, so this pop/push can be just:
>
> data->streams.back () = stream;

Oooh thanks, fixed locally.