[base] Add Value::Insert
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:Daniel Cheng <dcheng@chromium.org> Cr-Commit-Position: refs/heads/master@{#710725}
Showing
Please register or sign in to comment