On Fri, Feb 24, 2023 at 02:46:21PM +0100, Richard Biener wrote:
> As preparation to remove m_vecdata in the vl_embed vector this
> changes references to it into calls to address ().
> 
> As I was here it also fixes ::contains to avoid repeated bounds
> checking and the same issue in ::lower_bound which also suffers
> from unnecessary copying around values.
> 
>       * vec.h: Change m_vecdata references to address ().
>       * vec.h (vec<T, A, vl_embed>::lower_bound): Adjust to
>       take a const reference to the object, use address to
>       access data.
>       (vec<T, A, vl_embed>::contains): Use address to access data.
>       (vec<T, A, vl_embed>::operator[]): Use address instead of
>       m_vecdata to access data.
>       (vec<T, A, vl_embed>::iterate): Likewise.
>       (vec<T, A, vl_embed>::copy): Likewise.
>       (vec<T, A, vl_embed>::quick_push): Likewise.
>       (vec<T, A, vl_embed>::pop): Likewise.
>       (vec<T, A, vl_embed>::quick_insert): Likewise.
>       (vec<T, A, vl_embed>::ordered_remove): Likewise.
>       (vec<T, A, vl_embed>::unordered_remove): Likewise.
>       (vec<T, A, vl_embed>::block_remove): Likewise.
>       (vec<T, A, vl_heap>::address): Likewise.

Ok, thanks.

        Jakub

Reply via email to