| Index: base/stl_util.h
|
| diff --git a/base/stl_util.h b/base/stl_util.h
|
| index fef3eaa6430a32b2018922e49f5946cc2313b718..016bb156450692415d9814f6a011446cf68ca591 100644
|
| --- a/base/stl_util.h
|
| +++ b/base/stl_util.h
|
| @@ -54,26 +54,6 @@ inline char* string_as_array(std::string* str) {
|
| return str->empty() ? NULL : &*str->begin();
|
| }
|
|
|
| -// The following function is useful for cleaning up STL containers whose
|
| -// elements point to allocated memory.
|
| -
|
| -// Given an STL container consisting of (key, value) pairs, STLDeleteValues
|
| -// deletes all the "value" components and clears the container. Does nothing
|
| -// in the case it's given a NULL pointer.
|
| -template <class T>
|
| -void STLDeleteValues(T* container) {
|
| - if (!container)
|
| - return;
|
| -
|
| - for (auto it = container->begin(); it != container->end();) {
|
| - auto temp = it;
|
| - ++it;
|
| - delete temp->second;
|
| - }
|
| -
|
| - container->clear();
|
| -}
|
| -
|
| // Test to see if a set, map, hash_set or hash_map contains a particular key.
|
| // Returns true if the key is in the collection.
|
| template <typename Collection, typename Key>
|
|
|