diff options
author | 2015-08-26 13:07:48 -0700 | |
---|---|---|
committer | 2015-08-26 13:07:49 -0700 | |
commit | 385fe4d4b62d7d1dd76116dd570df3290a2f487b (patch) | |
tree | 53d982ff238828331e86acd44071a44162a8688c /src/core/SkBitmapHeap.cpp | |
parent | 5015176adf046ef906a2313b6e6b64b72cc84898 (diff) |
Style Change: SkNEW->new; SkDELETE->delete
DOCS_PREVIEW= https://skia.org/?cl=1316123003
Review URL: https://codereview.chromium.org/1316123003
Diffstat (limited to 'src/core/SkBitmapHeap.cpp')
-rw-r--r-- | src/core/SkBitmapHeap.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/core/SkBitmapHeap.cpp b/src/core/SkBitmapHeap.cpp index e1d3cae7e7..5b16d21e30 100644 --- a/src/core/SkBitmapHeap.cpp +++ b/src/core/SkBitmapHeap.cpp @@ -227,7 +227,7 @@ int SkBitmapHeap::findInLookupTable(const LookupEntry& indexEntry, SkBitmapHeapE if (index < 0) { // insert ourselves into the bitmapIndex index = ~index; - *fLookupTable.insert(index) = SkNEW_ARGS(LookupEntry, (indexEntry)); + *fLookupTable.insert(index) = new LookupEntry(indexEntry); } else if (entry != NULL) { // populate the entry if needed *entry = fStorage[fLookupTable[index]->fStorageSlot]; @@ -264,7 +264,7 @@ int SkBitmapHeap::removeEntryFromLookupTable(LookupEntry* entry) { // a new entry to the lookup table. SkASSERT(count == fLookupTable.count()); fBytesAllocated -= fStorage[entry->fStorageSlot]->fBytesAllocated; - SkDELETE(fLookupTable[index]); + delete fLookupTable[index]; fLookupTable.remove(index); return index; } @@ -317,7 +317,7 @@ int32_t SkBitmapHeap::insert(const SkBitmap& originalBitmap) { fUnusedSlots.pop(&slot); entry = fStorage[slot]; } else { - entry = SkNEW(SkBitmapHeapEntry); + entry = new SkBitmapHeapEntry; fStorage.append(1, &entry); entry->fSlot = fStorage.count() - 1; fBytesAllocated += sizeof(SkBitmapHeapEntry); @@ -335,14 +335,14 @@ int32_t SkBitmapHeap::insert(const SkBitmap& originalBitmap) { // if the copy failed then we must abort if (!copySucceeded) { // delete the index - SkDELETE(fLookupTable[searchIndex]); + delete fLookupTable[searchIndex]; fLookupTable.remove(searchIndex); // If entry is the last slot in storage, it is safe to delete it. if (fStorage.count() - 1 == entry->fSlot) { // free the slot fStorage.remove(entry->fSlot); fBytesAllocated -= sizeof(SkBitmapHeapEntry); - SkDELETE(entry); + delete entry; } else { fUnusedSlots.push(entry->fSlot); } |