| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CC_BASE_SCOPED_PTR_DEQUE_H_ | 5 #ifndef CC_BASE_SCOPED_PTR_DEQUE_H_ |
| 6 #define CC_BASE_SCOPED_PTR_DEQUE_H_ | 6 #define CC_BASE_SCOPED_PTR_DEQUE_H_ |
| 7 | 7 |
| 8 #include <algorithm> |
| 8 #include <deque> | 9 #include <deque> |
| 10 |
| 9 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 10 #include "base/logging.h" | 12 #include "base/logging.h" |
| 11 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 12 #include "base/stl_util.h" | 14 #include "base/stl_util.h" |
| 13 | 15 |
| 14 namespace cc { | 16 namespace cc { |
| 15 | 17 |
| 16 // This type acts like a deque<scoped_ptr> based on top of std::deque. The | 18 // This type acts like a deque<scoped_ptr> based on top of std::deque. The |
| 17 // ScopedPtrDeque has ownership of all elements in the deque. | 19 // ScopedPtrDeque has ownership of all elements in the deque. |
| 18 template <typename T> | 20 template <typename T> |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 | 128 |
| 127 private: | 129 private: |
| 128 std::deque<T*> data_; | 130 std::deque<T*> data_; |
| 129 | 131 |
| 130 DISALLOW_COPY_AND_ASSIGN(ScopedPtrDeque); | 132 DISALLOW_COPY_AND_ASSIGN(ScopedPtrDeque); |
| 131 }; | 133 }; |
| 132 | 134 |
| 133 } // namespace cc | 135 } // namespace cc |
| 134 | 136 |
| 135 #endif // CC_BASE_SCOPED_PTR_DEQUE_H_ | 137 #endif // CC_BASE_SCOPED_PTR_DEQUE_H_ |
| OLD | NEW |