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

Unified Diff: Source/wtf/Vector.h

Issue 1098953006: Oilpan: Support polymorphic objects in HeapVectorBackings (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 8 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 | « Source/platform/heap/HeapTest.cpp ('k') | no next file » | 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 6a52675cb750dba0308bb88990634058930791e2..967a50eae71c945915f1017a89ec32854c9b9a9d 100644
--- a/Source/wtf/Vector.h
+++ b/Source/wtf/Vector.h
@@ -90,7 +90,7 @@ static const size_t kInitialVectorSize = WTF_VECTOR_INITIAL_SIZE;
struct VectorUnusedSlotClearer<true, T> {
static void clear(T* begin, T* end)
{
- memset(begin, 0, sizeof(T) * (end - begin));
+ memset(reinterpret_cast<void*>(begin), 0, sizeof(T) * (end - begin));
tkent 2015/05/07 00:43:21 Why do you do reinterpret_cast<>?
haraken 2015/05/07 00:49:40 Because without the reinterpret_cast, clang compla
tkent 2015/05/08 06:42:00 Thanks. lgtm
}
#if ENABLE(ASSERT)
« no previous file with comments | « Source/platform/heap/HeapTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698