Lines Matching refs:container
22 // Deletes all the elements in an STL container and clears the container. This
24 // container which defines sensible begin(), end(), and clear() methods.
25 // If container is NULL, this function is a no-op.
27 void STLDeleteElements(T *container) {
28 if (!container) return;
29 auto it = container->begin();
30 while (it != container->end()) {
35 container->clear();
38 // Given an STL container consisting of (key, value) pairs, STLDeleteValues
39 // deletes all the "value" components and clears the container. Does nothing in
42 void STLDeleteValues(T *container) {
43 if (!container) return;
44 auto it = container->begin();
45 while (it != container->end()) {
50 container->clear();