Changeset 14728 in webkit for trunk/JavaScriptCore/wtf
- Timestamp:
- Jun 4, 2006, 3:51:57 PM (19 years ago)
- Location:
- trunk/JavaScriptCore/wtf
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/wtf/HashMap.h
r14256 r14728 309 309 void deleteAllPairSeconds(HashTableType& collection) 310 310 { 311 typedef typename HashTableType:: iterator iterator;311 typedef typename HashTableType::const_iterator iterator; 312 312 iterator end = collection.end(); 313 313 for (iterator it = collection.begin(); it != end; ++it) … … 316 316 317 317 template<typename T, typename U, typename V, typename W, typename X> 318 inline void deleteAllValues( HashMap<T, U, V, W, X>& collection)318 inline void deleteAllValues(const HashMap<T, U, V, W, X>& collection) 319 319 { 320 320 deleteAllPairSeconds<typename HashMap<T, U, V, W, X>::MappedType>(collection); -
trunk/JavaScriptCore/wtf/HashSet.h
r14256 r14728 33 33 template<typename Value, typename HashFunctions, typename Traits> class HashSet; 34 34 template<typename Value, typename HashFunctions, typename Traits> 35 void deleteAllValues( HashSet<Value, HashFunctions, Traits>&);35 void deleteAllValues(const HashSet<Value, HashFunctions, Traits>&); 36 36 37 37 template<typename ValueArg, typename HashArg = typename DefaultHash<ValueArg>::Hash, … … 92 92 void derefAll(); 93 93 94 friend void deleteAllValues<>( HashSet&);94 friend void deleteAllValues<>(const HashSet&); 95 95 96 96 HashTableType m_impl; … … 295 295 void deleteAllValues(HashTableType& collection) 296 296 { 297 typedef typename HashTableType:: iterator iterator;297 typedef typename HashTableType::const_iterator iterator; 298 298 iterator end = collection.end(); 299 299 for (iterator it = collection.begin(); it != end; ++it) … … 302 302 303 303 template<typename T, typename U, typename V> 304 inline void deleteAllValues( HashSet<T, U, V>& collection)304 inline void deleteAllValues(const HashSet<T, U, V>& collection) 305 305 { 306 306 deleteAllValues<typename HashSet<T, U, V>::ValueType>(collection.m_impl); -
trunk/JavaScriptCore/wtf/MathExtras.h
r14522 r14728 28 28 #if PLATFORM(WIN) 29 29 30 inline float roundf(float num) 31 { 32 return num > 0 ? floorf(num + 0.5f) : ceilf(num - 0.5f); 33 } 30 #include <xmath.h> 34 31 35 inline long lroundf(float num) 36 { 37 return num > 0 ? num + 0.5f : ceilf(num - 0.5f); 38 } 32 inline bool isinf(double num) { return !_finite(num); } 33 inline bool isnan(double num) { return _isnan(num); } 34 inline long lround(double num) { return num > 0 ? num + 0.5 : ceil(num - 0.5); } 35 inline long lroundf(float num) { return num > 0 ? num + 0.5f : ceilf(num - 0.5f); } 36 inline double round(double num) { return num > 0 ? floor(num + 0.5) : ceil(num - 0.5); } 37 inline float roundf(float num) { return num > 0 ? floorf(num + 0.5f) : ceilf(num - 0.5f); } 38 inline bool signbit(double num) { return _copysign(1.0, num) < 0; } 39 39 40 40 #endif -
trunk/JavaScriptCore/wtf/Vector.h
r14263 r14728 580 580 581 581 template<typename T, size_t inlineCapacity> 582 void deleteAllValues( Vector<T, inlineCapacity>& collection)583 { 584 typedef Vector<T, inlineCapacity> Vec;585 typename Vec::iterator end = collection.end();586 for ( typename Vec::iterator it = collection.begin(); it != end; ++it)582 void deleteAllValues(const Vector<T, inlineCapacity>& collection) 583 { 584 typedef typename Vector<T, inlineCapacity>::const_iterator iterator; 585 iterator end = collection.end(); 586 for (iterator it = collection.begin(); it != end; ++it) 587 587 delete *it; 588 588 }
Note:
See TracChangeset
for help on using the changeset viewer.