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

Side by Side Diff: third_party/WebKit/Source/wtf/Vector.h

Issue 1373833003: Make WTF::Vector work with gmock matchers, refactor some tests to use it (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Missed a couple Created 5 years, 2 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 | « third_party/WebKit/Source/platform/TimerTest.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after
616 }; 616 };
617 617
618 template <typename T, size_t inlineCapacity = 0, typename Allocator = DefaultAll ocator> // Heap-allocated vectors with no inlineCapacity never need a destructor . 618 template <typename T, size_t inlineCapacity = 0, typename Allocator = DefaultAll ocator> // Heap-allocated vectors with no inlineCapacity never need a destructor .
619 class Vector : private VectorBuffer<T, INLINE_CAPACITY, Allocator>, public Condi tionalDestructor<Vector<T, INLINE_CAPACITY, Allocator>, (INLINE_CAPACITY == 0) & & Allocator::isGarbageCollected> { 619 class Vector : private VectorBuffer<T, INLINE_CAPACITY, Allocator>, public Condi tionalDestructor<Vector<T, INLINE_CAPACITY, Allocator>, (INLINE_CAPACITY == 0) & & Allocator::isGarbageCollected> {
620 WTF_USE_ALLOCATOR(Vector, Allocator); 620 WTF_USE_ALLOCATOR(Vector, Allocator);
621 typedef VectorBuffer<T, INLINE_CAPACITY, Allocator> Base; 621 typedef VectorBuffer<T, INLINE_CAPACITY, Allocator> Base;
622 typedef VectorTypeOperations<T> TypeOperations; 622 typedef VectorTypeOperations<T> TypeOperations;
623 623
624 public: 624 public:
625 typedef T ValueType; 625 typedef T ValueType;
626 typedef T value_type;
626 627
627 typedef T* iterator; 628 typedef T* iterator;
628 typedef const T* const_iterator; 629 typedef const T* const_iterator;
629 typedef std::reverse_iterator<iterator> reverse_iterator; 630 typedef std::reverse_iterator<iterator> reverse_iterator;
630 typedef std::reverse_iterator<const_iterator> const_reverse_iterator; 631 typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
631 632
632 Vector() 633 Vector()
633 { 634 {
634 static_assert(!IsPolymorphic<T>::value || !VectorTraits<T>::canInitializ eWithMemset, "Cannot initialize with memset if there is a vtable"); 635 static_assert(!IsPolymorphic<T>::value || !VectorTraits<T>::canInitializ eWithMemset, "Cannot initialize with memset if there is a vtable");
635 #if ENABLE(OILPAN) 636 #if ENABLE(OILPAN)
(...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after
1341 struct NeedsTracing<Vector<T, N>> { 1342 struct NeedsTracing<Vector<T, N>> {
1342 static const bool value = false; 1343 static const bool value = false;
1343 }; 1344 };
1344 #endif 1345 #endif
1345 1346
1346 } // namespace WTF 1347 } // namespace WTF
1347 1348
1348 using WTF::Vector; 1349 using WTF::Vector;
1349 1350
1350 #endif // WTF_Vector_h 1351 #endif // WTF_Vector_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/TimerTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698