Changeset 28132 in webkit for trunk/JavaScriptCore/wtf
- Timestamp:
- Nov 28, 2007, 10:04:21 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/wtf/HashMap.h
r27710 r28132 395 395 396 396 template<typename T, typename U, typename V, typename W, typename X> 397 inline void copy ValuesToVector(const HashMap<T, U, V, W, X>& collection, Vector<U>& vector)398 { 399 typedef typename HashMap<T, U, V, W, X>::const_iterator iterator;397 inline void copyKeysToVector(const HashMap<T, U, V, W, X>& collection, Vector<T>& vector) 398 { 399 typedef typename HashMap<T, U, V, W, X>::const_iterator::Keys iterator; 400 400 401 401 vector.resize(collection.size()); 402 402 403 iterator it = collection.begin() ;404 iterator end = collection.end() ;403 iterator it = collection.begin().keys(); 404 iterator end = collection.end().keys(); 405 405 for (unsigned i = 0; it != end; ++it, ++i) 406 vector[i] = (*it).second; 406 vector[i] = *it; 407 } 408 409 template<typename T, typename U, typename V, typename W, typename X> 410 inline void copyValuesToVector(const HashMap<T, U, V, W, X>& collection, Vector<U>& vector) 411 { 412 typedef typename HashMap<T, U, V, W, X>::const_iterator::Values iterator; 413 414 vector.resize(collection.size()); 415 416 iterator it = collection.begin().values(); 417 iterator end = collection.end().values(); 418 for (unsigned i = 0; it != end; ++it, ++i) 419 vector[i] = *it; 407 420 } 408 421
Note:
See TracChangeset
for help on using the changeset viewer.