Lines Matching refs:container
59 void STLDeleteElements(T *container) { in STLDeleteElements() argument
60 if (container != nullptr) { in STLDeleteElements()
61 STLDeleteContainerPointers(container->begin(), container->end()); in STLDeleteElements()
62 container->clear(); in STLDeleteElements()
93 size_t IndexOfElement(const Container& container, const T& value) { in IndexOfElement() argument
94 auto it = std::find(container.begin(), container.end(), value); in IndexOfElement()
95 DCHECK(it != container.end()); // Must exist. in IndexOfElement()
96 return std::distance(container.begin(), it); in IndexOfElement()
101 void RemoveElement(Container& container, const T& value) { in RemoveElement() argument
102 auto it = std::find(container.begin(), container.end(), value); in RemoveElement()
103 DCHECK(it != container.end()); // Must exist. in RemoveElement()
104 container.erase(it); in RemoveElement()
109 void ReplaceElement(Container& container, const T& old_value, const T& new_value) { in ReplaceElement() argument
110 auto it = std::find(container.begin(), container.end(), old_value); in ReplaceElement()
111 DCHECK(it != container.end()); // Must exist. in ReplaceElement()
117 bool ContainsElement(const Container& container, const T& value, size_t start_pos = 0u) {
118 DCHECK_LE(start_pos, container.size());
119 auto start = container.begin();
121 auto it = std::find(start, container.end(), value);
122 return it != container.end();