Changeset 27448 in webkit for trunk/JavaScriptCore/wtf
- Timestamp:
- Nov 5, 2007, 1:27:15 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/wtf/Vector.h
r26618 r27448 457 457 template<typename U> void append(const U*, size_t); 458 458 template<typename U> void append(const U&); 459 template<typename U> void uncheckedAppend(const U& val); 459 460 template<typename U, size_t c> void append(const Vector<U, c>&); 460 461 … … 666 667 if (size() == capacity()) 667 668 ptr = expandCapacity(size() + 1, ptr); 669 new (end()) T(*ptr); 670 ++m_size; 671 } 672 673 // This version of append saves a branch in the case where you know that the 674 // vector's capacity is large enough for the append to succeed. 675 676 template<typename T, size_t inlineCapacity> template<typename U> 677 inline void Vector<T, inlineCapacity>::uncheckedAppend(const U& val) 678 { 679 ASSERT(size() < capacity()); 680 const U* ptr = &val; 668 681 new (end()) T(*ptr); 669 682 ++m_size;
Note:
See TracChangeset
for help on using the changeset viewer.