Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(163)

Unified Diff: src/core/SkPathRef.cpp

Issue 1316233002: Style Change: NULL->nullptr (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-27 (Thursday) 10:25:06 EDT Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/core/SkPathMeasure.cpp ('k') | src/core/SkPictureContentInfo.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkPathRef.cpp
diff --git a/src/core/SkPathRef.cpp b/src/core/SkPathRef.cpp
index e3317a6e7517bfd0ae99824b5f55558f9ad6b7f4..be7c66cc4bb8263fd2ed2b490ab20d708b0c6ba9 100644
--- a/src/core/SkPathRef.cpp
+++ b/src/core/SkPathRef.cpp
@@ -35,8 +35,8 @@ SkPathRef::~SkPathRef() {
SkDEBUGCODE(this->validate();)
sk_free(fPoints);
- SkDEBUGCODE(fPoints = NULL;)
- SkDEBUGCODE(fVerbs = NULL;)
+ SkDEBUGCODE(fPoints = nullptr;)
+ SkDEBUGCODE(fVerbs = nullptr;)
SkDEBUGCODE(fVerbCnt = 0x9999999;)
SkDEBUGCODE(fPointCnt = 0xAAAAAAA;)
SkDEBUGCODE(fPointCnt = 0xBBBBBBB;)
@@ -130,7 +130,7 @@ SkPathRef* SkPathRef::CreateFromBuffer(SkRBuffer* buffer) {
int32_t packed;
if (!buffer->readS32(&packed)) {
delete ref;
- return NULL;
+ return nullptr;
}
ref->fIsFinite = (packed >> kIsFinite_SerializationShift) & 1;
@@ -143,7 +143,7 @@ SkPathRef* SkPathRef::CreateFromBuffer(SkRBuffer* buffer) {
!buffer->readS32(&pointCount) ||
!buffer->readS32(&conicCount)) {
delete ref;
- return NULL;
+ return nullptr;
}
ref->resetToSize(verbCount, pointCount, conicCount);
@@ -156,7 +156,7 @@ SkPathRef* SkPathRef::CreateFromBuffer(SkRBuffer* buffer) {
!buffer->read(ref->fConicWeights.begin(), conicCount * sizeof(SkScalar)) ||
!buffer->read(&ref->fBounds, sizeof(SkRect))) {
delete ref;
- return NULL;
+ return nullptr;
}
ref->fBoundsIsDirty = false;
@@ -443,7 +443,7 @@ uint32_t SkPathRef::genID() const {
}
void SkPathRef::addGenIDChangeListener(GenIDChangeListener* listener) {
- if (NULL == listener || this == empty.get()) {
+ if (nullptr == listener || this == empty.get()) {
delete listener;
return;
}
@@ -465,11 +465,11 @@ void SkPathRef::validate() const {
this->INHERITED::validate();
SkASSERT(static_cast<ptrdiff_t>(fFreeSpace) >= 0);
SkASSERT(reinterpret_cast<intptr_t>(fVerbs) - reinterpret_cast<intptr_t>(fPoints) >= 0);
- SkASSERT((NULL == fPoints) == (NULL == fVerbs));
- SkASSERT(!(NULL == fPoints && 0 != fFreeSpace));
- SkASSERT(!(NULL == fPoints && 0 != fFreeSpace));
- SkASSERT(!(NULL == fPoints && fPointCnt));
- SkASSERT(!(NULL == fVerbs && fVerbCnt));
+ SkASSERT((nullptr == fPoints) == (nullptr == fVerbs));
+ SkASSERT(!(nullptr == fPoints && 0 != fFreeSpace));
+ SkASSERT(!(nullptr == fPoints && 0 != fFreeSpace));
+ SkASSERT(!(nullptr == fPoints && fPointCnt));
+ SkASSERT(!(nullptr == fVerbs && fVerbCnt));
SkASSERT(this->currSize() ==
fFreeSpace + sizeof(SkPoint) * fPointCnt + sizeof(uint8_t) * fVerbCnt);
« no previous file with comments | « src/core/SkPathMeasure.cpp ('k') | src/core/SkPictureContentInfo.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698