Index: src/core/SkDataTable.cpp |
diff --git a/src/core/SkDataTable.cpp b/src/core/SkDataTable.cpp |
index e2644a05c98d0bd886657ff72fc2fc12292058c5..20bc4308530c7625e8463c71c979b3217a030c2e 100644 |
--- a/src/core/SkDataTable.cpp |
+++ b/src/core/SkDataTable.cpp |
@@ -79,7 +79,7 @@ const void* SkDataTable::at(int index, size_t* size) const { |
SkDataTable* SkDataTable::NewEmpty() { |
static SkDataTable* gEmpty; |
if (NULL == gEmpty) { |
- gEmpty = SkNEW(SkDataTable); |
+ gEmpty = new SkDataTable; |
} |
gEmpty->ref(); |
return gEmpty; |
@@ -108,7 +108,7 @@ SkDataTable* SkDataTable::NewCopyArrays(const void * const * ptrs, |
elem += sizes[i]; |
} |
- return SkNEW_ARGS(SkDataTable, (dir, count, malloc_freeproc, buffer)); |
+ return new SkDataTable(dir, count, malloc_freeproc, buffer); |
} |
SkDataTable* SkDataTable::NewCopyArray(const void* array, size_t elemSize, |
@@ -121,8 +121,7 @@ SkDataTable* SkDataTable::NewCopyArray(const void* array, size_t elemSize, |
void* buffer = sk_malloc_throw(bufferSize); |
memcpy(buffer, array, bufferSize); |
- return SkNEW_ARGS(SkDataTable, |
- (buffer, elemSize, count, malloc_freeproc, buffer)); |
+ return new SkDataTable(buffer, elemSize, count, malloc_freeproc, buffer); |
} |
SkDataTable* SkDataTable::NewArrayProc(const void* array, size_t elemSize, |
@@ -130,14 +129,12 @@ SkDataTable* SkDataTable::NewArrayProc(const void* array, size_t elemSize, |
if (count <= 0) { |
return SkDataTable::NewEmpty(); |
} |
- return SkNEW_ARGS(SkDataTable, (array, elemSize, count, proc, ctx)); |
+ return new SkDataTable(array, elemSize, count, proc, ctx); |
} |
/////////////////////////////////////////////////////////////////////////////// |
-static void chunkalloc_freeproc(void* context) { |
- SkDELETE((SkChunkAlloc*)context); |
-} |
+static void chunkalloc_freeproc(void* context) { delete (SkChunkAlloc*)context; } |
SkDataTableBuilder::SkDataTableBuilder(size_t minChunkSize) |
: fHeap(NULL) |
@@ -149,14 +146,14 @@ void SkDataTableBuilder::reset(size_t minChunkSize) { |
fMinChunkSize = minChunkSize; |
fDir.reset(); |
if (fHeap) { |
- SkDELETE(fHeap); |
+ delete fHeap; |
fHeap = NULL; |
} |
} |
void SkDataTableBuilder::append(const void* src, size_t size) { |
if (NULL == fHeap) { |
- fHeap = SkNEW_ARGS(SkChunkAlloc, (fMinChunkSize)); |
+ fHeap = new SkChunkAlloc(fMinChunkSize); |
} |
void* dst = fHeap->alloc(size, SkChunkAlloc::kThrow_AllocFailType); |
@@ -178,9 +175,7 @@ SkDataTable* SkDataTableBuilder::detachDataTable() { |
SkChunkAlloc::kThrow_AllocFailType); |
memcpy(dir, fDir.begin(), count * sizeof(SkDataTable::Dir)); |
- SkDataTable* table = SkNEW_ARGS(SkDataTable, |
- ((SkDataTable::Dir*)dir, count, |
- chunkalloc_freeproc, fHeap)); |
+ SkDataTable* table = new SkDataTable((SkDataTable::Dir*)dir, count, chunkalloc_freeproc, fHeap); |
// we have to detach our fHeap, since we are giving that to the table |
fHeap = NULL; |
fDir.reset(); |