Changeset 54618 in webkit for trunk/JavaScriptCore/wtf/Vector.h
- Timestamp:
- Feb 10, 2010, 1:14:24 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/wtf/Vector.h
r51905 r54618 25 25 #include "Noncopyable.h" 26 26 #include "NotFound.h" 27 #include "ValueCheck.h" 27 28 #include "VectorTraits.h" 28 29 #include <limits> … … 587 588 } 588 589 590 void checkConsistency(); 591 589 592 private: 590 593 void expandCapacity(size_t newMinCapacity); … … 988 991 989 992 template<typename T, size_t inlineCapacity> 993 inline void Vector<T, inlineCapacity>::checkConsistency() 994 { 995 #if !ASSERT_DISABLED 996 for (size_t i = 0; i < size(); ++i) { 997 ValueCheck<T>::checkConsistency(at(i)); 998 } 999 #endif 1000 } 1001 1002 template<typename T, size_t inlineCapacity> 990 1003 void deleteAllValues(const Vector<T, inlineCapacity>& collection) 991 1004 { … … 1017 1030 } 1018 1031 1032 #if !ASSERT_DISABLED 1033 template<typename T> struct ValueCheck<Vector<T> > { 1034 typedef Vector<T> TraitType; 1035 static void checkConsistency(const Vector<T>& v) 1036 { 1037 v.checkConsistency(); 1038 } 1039 }; 1040 #endif 1019 1041 1020 1042 } // namespace WTF
Note:
See TracChangeset
for help on using the changeset viewer.