Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(67)

Side by Side Diff: cc/base/list_container.cc

Issue 1202153002: Add ListContainer::AppendByMoving (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address reviewer comments Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/base/list_container.h ('k') | cc/base/list_container_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include "cc/base/list_container.h" 5 #include "cc/base/list_container.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "cc/base/scoped_ptr_vector.h" 10 #include "cc/base/scoped_ptr_vector.h"
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 } 414 }
415 415
416 size_t ListContainerBase::size() const { 416 size_t ListContainerBase::size() const {
417 return data_->size(); 417 return data_->size();
418 } 418 }
419 419
420 bool ListContainerBase::empty() const { 420 bool ListContainerBase::empty() const {
421 return data_->IsEmpty(); 421 return data_->IsEmpty();
422 } 422 }
423 423
424 size_t ListContainerBase::MaxSizeForDerivedClass() const {
425 return data_->element_size();
426 }
427
424 void ListContainerBase::clear() { 428 void ListContainerBase::clear() {
425 data_->Clear(); 429 data_->Clear();
426 } 430 }
427 431
428 size_t ListContainerBase::AvailableSizeWithoutAnotherAllocationForTesting() 432 size_t ListContainerBase::AvailableSizeWithoutAnotherAllocationForTesting()
429 const { 433 const {
430 return data_->NumAvailableElementsInLastList(); 434 return data_->NumAvailableElementsInLastList();
431 } 435 }
432 436
433 // ListContainerBase::Iterator 437 // ListContainerBase::Iterator
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
505 } 509 }
506 510
507 ListContainerBase::ConstReverseIterator::~ConstReverseIterator() { 511 ListContainerBase::ConstReverseIterator::~ConstReverseIterator() {
508 } 512 }
509 513
510 size_t ListContainerBase::ConstReverseIterator::index() const { 514 size_t ListContainerBase::ConstReverseIterator::index() const {
511 return index_; 515 return index_;
512 } 516 }
513 517
514 } // namespace cc 518 } // namespace cc
OLDNEW
« no previous file with comments | « cc/base/list_container.h ('k') | cc/base/list_container_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698