| 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 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 318 TypeOperations::destruct(m_buffer.buffer() + m_start, m_buffer.buffe
r() + m_buffer.capacity()); | 318 TypeOperations::destruct(m_buffer.buffer() + m_start, m_buffer.buffe
r() + m_buffer.capacity()); |
| 319 } | 319 } |
| 320 } | 320 } |
| 321 | 321 |
| 322 template<typename T, size_t inlineCapacity> | 322 template<typename T, size_t inlineCapacity> |
| 323 inline Deque<T, inlineCapacity>::~Deque() | 323 inline Deque<T, inlineCapacity>::~Deque() |
| 324 { | 324 { |
| 325 checkValidity(); | 325 checkValidity(); |
| 326 invalidateIterators(); | 326 invalidateIterators(); |
| 327 destroyAll(); | 327 destroyAll(); |
| 328 m_buffer.destruct(); | |
| 329 } | 328 } |
| 330 | 329 |
| 331 template<typename T, size_t inlineCapacity> | 330 template<typename T, size_t inlineCapacity> |
| 332 inline void Deque<T, inlineCapacity>::swap(Deque<T, inlineCapacity>& other) | 331 inline void Deque<T, inlineCapacity>::swap(Deque<T, inlineCapacity>& other) |
| 333 { | 332 { |
| 334 checkValidity(); | 333 checkValidity(); |
| 335 other.checkValidity(); | 334 other.checkValidity(); |
| 336 invalidateIterators(); | 335 invalidateIterators(); |
| 337 std::swap(m_start, other.m_start); | 336 std::swap(m_start, other.m_start); |
| 338 std::swap(m_end, other.m_end); | 337 std::swap(m_end, other.m_end); |
| (...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 640 if (!m_index) | 639 if (!m_index) |
| 641 return &m_deque->m_buffer.buffer()[m_deque->m_buffer.capacity() - 1]
; | 640 return &m_deque->m_buffer.buffer()[m_deque->m_buffer.capacity() - 1]
; |
| 642 return &m_deque->m_buffer.buffer()[m_index - 1]; | 641 return &m_deque->m_buffer.buffer()[m_index - 1]; |
| 643 } | 642 } |
| 644 | 643 |
| 645 } // namespace WTF | 644 } // namespace WTF |
| 646 | 645 |
| 647 using WTF::Deque; | 646 using WTF::Deque; |
| 648 | 647 |
| 649 #endif // WTF_Deque_h | 648 #endif // WTF_Deque_h |
| OLD | NEW |