| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_RANDOM_ACCESS_LIST_CONTAINER_H_ | 5 #ifndef CC_BASE_RANDOM_ACCESS_LIST_CONTAINER_H_ |
| 6 #define CC_BASE_RANDOM_ACCESS_LIST_CONTAINER_H_ | 6 #define CC_BASE_RANDOM_ACCESS_LIST_CONTAINER_H_ |
| 7 | 7 |
| 8 #include <stddef.h> |
| 9 |
| 8 #include <vector> | 10 #include <vector> |
| 9 | 11 |
| 10 #include "base/logging.h" | 12 #include "base/logging.h" |
| 11 #include "cc/base/list_container_helper.h" | 13 #include "cc/base/list_container_helper.h" |
| 12 | 14 |
| 13 namespace cc { | 15 namespace cc { |
| 14 | 16 |
| 15 // RandomAccessListContainer is a container similar to ListContainer (see | 17 // RandomAccessListContainer is a container similar to ListContainer (see |
| 16 // list_container.h), but it allows random access into its elements via | 18 // list_container.h), but it allows random access into its elements via |
| 17 // operator[]. In order to have efficient support for random access, some | 19 // operator[]. In order to have efficient support for random access, some |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 ConstIterator end() const { return items_.end(); } | 87 ConstIterator end() const { return items_.end(); } |
| 86 | 88 |
| 87 private: | 89 private: |
| 88 ListContainerHelper helper_; | 90 ListContainerHelper helper_; |
| 89 std::vector<BaseElementType*> items_; | 91 std::vector<BaseElementType*> items_; |
| 90 }; | 92 }; |
| 91 | 93 |
| 92 } // namespace cc | 94 } // namespace cc |
| 93 | 95 |
| 94 #endif // CC_BASE_RANDOM_ACCESS_LIST_CONTAINER_H_ | 96 #endif // CC_BASE_RANDOM_ACCESS_LIST_CONTAINER_H_ |
| OLD | NEW |