• Jan Wilken Dörrie's avatar
    [base] Add Value::Insert · 9065545e
    Jan Wilken Dörrie authored
    In order to prepare for the switch of the return value of
    Value::GetList() from Value::ListStorage& to span<Value> this change
    adds an Insert API to Value, allowing callers to insert Values at
    arbitrary positiions in the list. The signature of the API is inspired
    by std::vector::insert, taking a insertion position and a Value, and
    returning an iterator pointing to the just inserted element.
    
    Bug: 646113
    Change-Id: Ibacc9e1c22ee60b6f35661b66de951746e978b76
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1887694
    Commit-Queue: Jan Wilken Dörrie <jdoerrie@chromium.org>
    Reviewed-by: default avatarDaniel Cheng <dcheng@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#710725}
    9065545e
values.h 41.8 KB