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

Unified Diff: Source/wtf/Vector.h

Issue 291933002: Initialize the memory allocated by Vector<IsPod<T>> (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Better change Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/wtf/VectorTraits.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/wtf/Vector.h
diff --git a/Source/wtf/Vector.h b/Source/wtf/Vector.h
index 235b638a02710735e11a730dd9ad04d4e1584677..b080656e6be6ddab0e118fe381fad9cbfeb8fe90 100644
--- a/Source/wtf/Vector.h
+++ b/Source/wtf/Vector.h
@@ -80,17 +80,11 @@ static const size_t kInitialVectorSize = WTF_VECTOR_INITIAL_SIZE;
}
};
- template <bool needsInitialization, bool canInitializeWithMemset, typename T>
+ template <bool canInitializeWithMemset, typename T>
struct VectorInitializer;
- template<bool ignore, typename T>
- struct VectorInitializer<false, ignore, T>
- {
- static void initialize(T*, T*) {}
- };
-
template<typename T>
- struct VectorInitializer<true, false, T>
+ struct VectorInitializer<false, T>
{
static void initialize(T* begin, T* end)
{
@@ -100,7 +94,7 @@ static const size_t kInitialVectorSize = WTF_VECTOR_INITIAL_SIZE;
};
template<typename T>
- struct VectorInitializer<true, true, T>
+ struct VectorInitializer<true, T>
{
static void initialize(T* begin, T* end)
{
@@ -250,7 +244,7 @@ static const size_t kInitialVectorSize = WTF_VECTOR_INITIAL_SIZE;
static void initialize(T* begin, T* end)
{
- VectorInitializer<VectorTraits<T>::needsInitialization, VectorTraits<T>::canInitializeWithMemset, T>::initialize(begin, end);
+ VectorInitializer<VectorTraits<T>::canInitializeWithMemset, T>::initialize(begin, end);
}
static void move(const T* src, const T* srcEnd, T* dst)
« no previous file with comments | « no previous file | Source/wtf/VectorTraits.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698