diff options
Diffstat (limited to 'base/values.h')
-rw-r--r-- | base/values.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/base/values.h b/base/values.h index cd68b10..482ffa0 100644 --- a/base/values.h +++ b/base/values.h @@ -334,12 +334,17 @@ class ListValue : public Value { // it will return false and the ListValue object will be unchanged. bool Remove(size_t index, Value** out_value); - // Removes the first instance of |value| found in the list, if any. - void Remove(const Value& value); + // Removes the first instance of |value| found in the list, if any, returning + // the index that it was located at (-1 for not present). + int Remove(const Value& value); // Appends a Value to the end of the list. void Append(Value* in_value); + // Insert a Value at index. + // Returns true if successful, or false if the index was out of range. + bool Insert(size_t index, Value* in_value); + // Iteration typedef ValueVector::iterator iterator; typedef ValueVector::const_iterator const_iterator; |