Changeset 32760 in webkit for trunk/JavaScriptCore/wtf/HashCountedSet.h
- Timestamp:
- May 1, 2008, 9:32:32 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/wtf/HashCountedSet.h
r17127 r32760 26 26 #include "Assertions.h" 27 27 #include "HashMap.h" 28 #include "Vector.h" 28 29 29 30 namespace WTF { … … 171 172 m_impl.clear(); 172 173 } 174 175 template<typename Value, typename HashFunctions, typename Traits, typename VectorType> 176 inline void copyToVector(const HashCountedSet<Value, HashFunctions, Traits>& collection, VectorType& vector) 177 { 178 typedef typename HashCountedSet<Value, HashFunctions, Traits>::const_iterator iterator; 179 180 vector.resize(collection.size()); 181 182 iterator it = collection.begin(); 183 iterator end = collection.end(); 184 for (unsigned i = 0; it != end; ++it, ++i) 185 vector[i] = *it; 186 } 187 188 template<typename Value, typename HashFunctions, typename Traits> 189 inline void copyToVector(const HashCountedSet<Value, HashFunctions, Traits>& collection, Vector<Value>& vector) 190 { 191 typedef typename HashCountedSet<Value, HashFunctions, Traits>::const_iterator iterator; 192 193 vector.resize(collection.size()); 194 195 iterator it = collection.begin(); 196 iterator end = collection.end(); 197 for (unsigned i = 0; it != end; ++it, ++i) 198 vector[i] = (*it).first; 199 } 200 173 201 174 202 } // namespace khtml
Note:
See TracChangeset
for help on using the changeset viewer.