OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. |
3 * Copyright (C) 2009 Google Inc. All rights reserved. | 3 * Copyright (C) 2009 Google Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * | 8 * |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 TypeOperations::uninitializedCopy(otherBuffer + m_start, otherBuffer
+ m_end, m_buffer.buffer() + m_start); | 222 TypeOperations::uninitializedCopy(otherBuffer + m_start, otherBuffer
+ m_end, m_buffer.buffer() + m_start); |
223 else { | 223 else { |
224 TypeOperations::uninitializedCopy(otherBuffer, otherBuffer + m_end,
m_buffer.buffer()); | 224 TypeOperations::uninitializedCopy(otherBuffer, otherBuffer + m_end,
m_buffer.buffer()); |
225 TypeOperations::uninitializedCopy(otherBuffer + m_start, otherBuffer
+ m_buffer.capacity(), m_buffer.buffer() + m_start); | 225 TypeOperations::uninitializedCopy(otherBuffer + m_start, otherBuffer
+ m_buffer.capacity(), m_buffer.buffer() + m_start); |
226 } | 226 } |
227 } | 227 } |
228 | 228 |
229 template<typename T, size_t inlineCapacity, typename Allocator> | 229 template<typename T, size_t inlineCapacity, typename Allocator> |
230 inline Deque<T, 0, Allocator>& Deque<T, inlineCapacity, Allocator>::operator
=(const Deque& other) | 230 inline Deque<T, 0, Allocator>& Deque<T, inlineCapacity, Allocator>::operator
=(const Deque& other) |
231 { | 231 { |
232 Deque<T> copy(other); | 232 Deque<T, 0, Allocator> copy(other); |
233 swap(copy); | 233 swap(copy); |
234 return *this; | 234 return *this; |
235 } | 235 } |
236 | 236 |
237 template<typename T, size_t inlineCapacity, typename Allocator> | 237 template<typename T, size_t inlineCapacity, typename Allocator> |
238 inline void Deque<T, inlineCapacity, Allocator>::destroyAll() | 238 inline void Deque<T, inlineCapacity, Allocator>::destroyAll() |
239 { | 239 { |
240 if (m_start <= m_end) { | 240 if (m_start <= m_end) { |
241 TypeOperations::destruct(m_buffer.buffer() + m_start, m_buffer.buffe
r() + m_end); | 241 TypeOperations::destruct(m_buffer.buffer() + m_start, m_buffer.buffe
r() + m_end); |
242 m_buffer.clearUnusedSlots(m_buffer.buffer() + m_start, m_buffer.buff
er() + m_end); | 242 m_buffer.clearUnusedSlots(m_buffer.buffer() + m_start, m_buffer.buff
er() + m_end); |
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
533 struct NeedsTracing<Deque<T, N> > { | 533 struct NeedsTracing<Deque<T, N> > { |
534 static const bool value = false; | 534 static const bool value = false; |
535 }; | 535 }; |
536 #endif | 536 #endif |
537 | 537 |
538 } // namespace WTF | 538 } // namespace WTF |
539 | 539 |
540 using WTF::Deque; | 540 using WTF::Deque; |
541 | 541 |
542 #endif // WTF_Deque_h | 542 #endif // WTF_Deque_h |
OLD | NEW |