diff options
author | halcanary <halcanary@google.com> | 2015-08-26 13:07:48 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-08-26 13:07:49 -0700 |
commit | 385fe4d4b62d7d1dd76116dd570df3290a2f487b (patch) | |
tree | 53d982ff238828331e86acd44071a44162a8688c /src/core/SkPathRef.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/SkPathRef.cpp')
-rw-r--r-- | src/core/SkPathRef.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/core/SkPathRef.cpp b/src/core/SkPathRef.cpp index 38b4e71cba..e3317a6e75 100644 --- a/src/core/SkPathRef.cpp +++ b/src/core/SkPathRef.cpp @@ -18,7 +18,7 @@ SkPathRef::Editor::Editor(SkAutoTUnref<SkPathRef>* pathRef, if ((*pathRef)->unique()) { (*pathRef)->incReserve(incReserveVerbs, incReservePoints); } else { - SkPathRef* copy = SkNEW(SkPathRef); + SkPathRef* copy = new SkPathRef; copy->copy(**pathRef, incReserveVerbs, incReservePoints); pathRef->reset(copy); } @@ -46,7 +46,7 @@ SkPathRef::~SkPathRef() { // As a template argument, this must have external linkage. SkPathRef* sk_create_empty_pathref() { - SkPathRef* empty = SkNEW(SkPathRef); + SkPathRef* empty = new SkPathRef; empty->computeBounds(); // Avoids races later to be the first to do this. return empty; } @@ -71,7 +71,7 @@ void SkPathRef::CreateTransformedCopy(SkAutoTUnref<SkPathRef>* dst, } if (!(*dst)->unique()) { - dst->reset(SkNEW(SkPathRef)); + dst->reset(new SkPathRef); } if (*dst != &src) { @@ -123,13 +123,13 @@ void SkPathRef::CreateTransformedCopy(SkAutoTUnref<SkPathRef>* dst, } SkPathRef* SkPathRef::CreateFromBuffer(SkRBuffer* buffer) { - SkPathRef* ref = SkNEW(SkPathRef); + SkPathRef* ref = new SkPathRef; bool isOval; uint8_t segmentMask; int32_t packed; if (!buffer->readS32(&packed)) { - SkDELETE(ref); + delete ref; return NULL; } @@ -142,7 +142,7 @@ SkPathRef* SkPathRef::CreateFromBuffer(SkRBuffer* buffer) { !buffer->readS32(&verbCount) || !buffer->readS32(&pointCount) || !buffer->readS32(&conicCount)) { - SkDELETE(ref); + delete ref; return NULL; } @@ -155,7 +155,7 @@ SkPathRef* SkPathRef::CreateFromBuffer(SkRBuffer* buffer) { !buffer->read(ref->fPoints, pointCount * sizeof(SkPoint)) || !buffer->read(ref->fConicWeights.begin(), conicCount * sizeof(SkScalar)) || !buffer->read(&ref->fBounds, sizeof(SkRect))) { - SkDELETE(ref); + delete ref; return NULL; } ref->fBoundsIsDirty = false; @@ -182,7 +182,7 @@ void SkPathRef::Rewind(SkAutoTUnref<SkPathRef>* pathRef) { } else { int oldVCnt = (*pathRef)->countVerbs(); int oldPCnt = (*pathRef)->countPoints(); - pathRef->reset(SkNEW(SkPathRef)); + pathRef->reset(new SkPathRef); (*pathRef)->resetToSize(0, 0, 0, oldVCnt, oldPCnt); } } @@ -444,7 +444,7 @@ uint32_t SkPathRef::genID() const { void SkPathRef::addGenIDChangeListener(GenIDChangeListener* listener) { if (NULL == listener || this == empty.get()) { - SkDELETE(listener); + delete listener; return; } *fGenIDChangeListeners.append() = listener; |