OLD | NEW |
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 20 matching lines...) Expand all Loading... |
31 #include <limits> | 31 #include <limits> |
32 #include <utility> | 32 #include <utility> |
33 #include <string.h> | 33 #include <string.h> |
34 | 34 |
35 namespace WTF { | 35 namespace WTF { |
36 | 36 |
37 #if defined(MEMORY_TOOL_REPLACES_ALLOCATOR) | 37 #if defined(MEMORY_TOOL_REPLACES_ALLOCATOR) |
38 static const size_t kInitialVectorSize = 1; | 38 static const size_t kInitialVectorSize = 1; |
39 #else | 39 #else |
40 #ifndef WTF_VECTOR_INITIAL_SIZE | 40 #ifndef WTF_VECTOR_INITIAL_SIZE |
41 #define WTF_VECTOR_INITIAL_SIZE 16 | 41 #define WTF_VECTOR_INITIAL_SIZE 4 |
42 #endif | 42 #endif |
43 static const size_t kInitialVectorSize = WTF_VECTOR_INITIAL_SIZE; | 43 static const size_t kInitialVectorSize = WTF_VECTOR_INITIAL_SIZE; |
44 #endif | 44 #endif |
45 | 45 |
46 template <bool needsDestruction, typename T> | 46 template <bool needsDestruction, typename T> |
47 struct VectorDestructor; | 47 struct VectorDestructor; |
48 | 48 |
49 template<typename T> | 49 template<typename T> |
50 struct VectorDestructor<false, T> | 50 struct VectorDestructor<false, T> |
51 { | 51 { |
(...skipping 1012 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1064 inline bool operator!=(const Vector<T, inlineCapacity>& a, const Vector<T, i
nlineCapacity>& b) | 1064 inline bool operator!=(const Vector<T, inlineCapacity>& a, const Vector<T, i
nlineCapacity>& b) |
1065 { | 1065 { |
1066 return !(a == b); | 1066 return !(a == b); |
1067 } | 1067 } |
1068 | 1068 |
1069 } // namespace WTF | 1069 } // namespace WTF |
1070 | 1070 |
1071 using WTF::Vector; | 1071 using WTF::Vector; |
1072 | 1072 |
1073 #endif // WTF_Vector_h | 1073 #endif // WTF_Vector_h |
OLD | NEW |