Add placement new macros to SkPostConfig, call SkNEW* from Ganesh.
TODO: unify with the placement new implementation in SkTemplatesPriv.h,
once various issues there are overcome. reed@ should be taking the lead
there.
http://codereview.appspot.com/6384043/
git-svn-id: http://skia.googlecode.com/svn/trunk@4492 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/GrAllocator.h b/src/gpu/GrAllocator.h
index f333d42..ae456cd 100755
--- a/src/gpu/GrAllocator.h
+++ b/src/gpu/GrAllocator.h
@@ -163,14 +163,14 @@
T& push_back() {
void* item = fAllocator.push_back();
GrAssert(NULL != item);
- new (item) T;
+ SkNEW_PLACEMENT(item, T);
return *(T*)item;
}
T& push_back(const T& t) {
void* item = fAllocator.push_back();
GrAssert(NULL != item);
- new (item) T(t);
+ SkNEW_PLACEMENT_ARGS(item, T, (t));
return *(T*)item;
}