aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-07-21 19:39:24 +0000
committerGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-07-21 19:39:24 +0000
commit0c6a736617d242547135b731adb8333581b2f2dc (patch)
treeeec20f210e3556a558fdcfdeb711ca41af9a008b
parent80ba7964cde0f7805d76cf0170cf3b920146a007 (diff)
include <new> since we use placement-new
git-svn-id: http://skia.googlecode.com/svn/trunk@4710 2bbb7eff-a529-9590-31e7-b0007b416f81
-rwxr-xr-xsrc/core/SkTRefArray.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/SkTRefArray.h b/src/core/SkTRefArray.h
index f352cf1ba5..7d00a4d699 100755
--- a/src/core/SkTRefArray.h
+++ b/src/core/SkTRefArray.h
@@ -10,6 +10,7 @@
#define SkTRefArray_DEFINED
#include "SkThread.h"
+#include <new>
/**
* Wrapper to manage thread-safe sharing of an array of T objects. The array
@@ -23,12 +24,11 @@ public:
obj->fCount = count;
obj->fRefCnt = 1;
-
+
T* array = const_cast<T*>(obj->begin());
for (int i = 0; i < count; ++i) {
new (&array[i]) T;
}
-
return obj;
}