| 122 | // the case it's given a NULL pointer. |
| 123 | template <typename T> |
| 124 | void STLDeleteValues(T* container) { |
| 125 | if (!container) return; |
| 126 | auto it = container->begin(); |
| 127 | while (it != container->end()) { |
| 128 | auto temp = it; |
| 129 | ++it; |
| 130 | delete temp->second; |
| 131 | } |
| 132 | container->clear(); |
| 133 | } |
| 134 | |
| 135 | // Sorts and removes duplicates from a sequence container. |
| 136 | template <typename T> |
no test coverage detected