Index: src/animator/SkDisplayType.cpp |
diff --git a/src/animator/SkDisplayType.cpp b/src/animator/SkDisplayType.cpp |
index 87ea560d80c09e2ed29cdc6c83aeafc2b7f14153..7ee8dab5a410db333889c6c207d725af810ae62b 100644 |
--- a/src/animator/SkDisplayType.cpp |
+++ b/src/animator/SkDisplayType.cpp |
@@ -62,7 +62,7 @@ |
case SkType_##_class: result = new SkDisplay##_class(); break |
#ifdef SK_DEBUG |
#define CASE_DEBUG_RETURN_NIL(_class) \ |
- case SkType_##_class: return NULL |
+ case SkType_##_class: return nullptr |
#else |
#define CASE_DEBUG_RETURN_NIL(_class) |
#endif |
@@ -71,7 +71,7 @@ |
SkDisplayTypes SkDisplayType::gNewTypes = kNumberOfTypes; |
SkDisplayable* SkDisplayType::CreateInstance(SkAnimateMaker* maker, SkDisplayTypes type) { |
- SkDisplayable* result = NULL; |
+ SkDisplayable* result = nullptr; |
switch (type) { |
// unknown |
CASE_DISPLAY_NEW(Math); |
@@ -200,7 +200,7 @@ SkDisplayable* SkDisplayType::CreateInstance(SkAnimateMaker* maker, SkDisplayTyp |
default: |
SkExtras** end = maker->fExtras.end(); |
for (SkExtras** extraPtr = maker->fExtras.begin(); extraPtr < end; extraPtr++) { |
- if ((result = (*extraPtr)->createInstance(type)) != NULL) |
+ if ((result = (*extraPtr)->createInstance(type)) != nullptr) |
return result; |
} |
SkASSERT(0); |
@@ -224,7 +224,7 @@ SkDisplayable* SkDisplayType::CreateInstance(SkAnimateMaker* maker, SkDisplayTyp |
const SkMemberInfo* SkDisplayType::GetMembers(SkAnimateMaker* maker, |
SkDisplayTypes type, int* infoCountPtr) { |
- const SkMemberInfo* info = NULL; |
+ const SkMemberInfo* info = nullptr; |
int infoCount = 0; |
switch (type) { |
// unknown |
@@ -356,11 +356,11 @@ const SkMemberInfo* SkDisplayType::GetMembers(SkAnimateMaker* maker, |
if (maker) { |
SkExtras** end = maker->fExtras.end(); |
for (SkExtras** extraPtr = maker->fExtras.begin(); extraPtr < end; extraPtr++) { |
- if ((info = (*extraPtr)->getMembers(type, infoCountPtr)) != NULL) |
+ if ((info = (*extraPtr)->getMembers(type, infoCountPtr)) != nullptr) |
return info; |
} |
} |
- return NULL; |
+ return nullptr; |
} |
if (infoCountPtr) |
*infoCountPtr = infoCount; |
@@ -525,7 +525,7 @@ const int kTypeNamesSize = SK_ARRAY_COUNT(gTypeNames); |
SkDisplayTypes SkDisplayType::Find(SkAnimateMaker* maker, const SkMemberInfo* match) { |
for (int index = 0; index < kTypeNamesSize; index++) { |
SkDisplayTypes type = gTypeNames[index].fType; |
- const SkMemberInfo* info = SkDisplayType::GetMembers(maker, type, NULL); |
+ const SkMemberInfo* info = SkDisplayType::GetMembers(maker, type, nullptr); |
if (info == match) |
return type; |
} |
@@ -538,7 +538,7 @@ SkDisplayTypes SkDisplayType::GetParent(SkAnimateMaker* maker, SkDisplayTypes ba |
return SkType_Displayable; |
if (base == SkType_Set) |
return SkType_Animate; // another cheat until we have a lookup table |
- const SkMemberInfo* info = GetMembers(maker, base, NULL); // get info for this type |
+ const SkMemberInfo* info = GetMembers(maker, base, nullptr); // get info for this type |
SkASSERT(info); |
if (info->fType != SkType_BaseClassInfo) |
return SkType_Unknown; // if no base, done |
@@ -547,7 +547,7 @@ SkDisplayTypes SkDisplayType::GetParent(SkAnimateMaker* maker, SkDisplayTypes ba |
const SkMemberInfo* inherited = info->getInherited(); |
SkDisplayTypes result = (SkDisplayTypes) (SkType_Unknown + 1); |
for (; result <= SkType_Xfermode; result = (SkDisplayTypes) (result + 1)) { |
- const SkMemberInfo* match = GetMembers(maker, result, NULL); |
+ const SkMemberInfo* match = GetMembers(maker, result, nullptr); |
if (match == inherited) |
break; |
} |
@@ -710,10 +710,10 @@ const char* SkDisplayType::GetName(SkAnimateMaker* maker, SkDisplayTypes type) { |
SkExtras** end = maker->fExtras.end(); |
for (SkExtras** extraPtr = maker->fExtras.begin(); extraPtr < end; extraPtr++) { |
const char* result = (*extraPtr)->getName(type); |
- if (result != NULL) |
+ if (result != nullptr) |
return result; |
} |
- return NULL; |
+ return nullptr; |
} |
#endif |
@@ -728,7 +728,7 @@ void SkDisplayType::UnitTest() { |
} |
for (index = 0; index < kTypeNamesSize; index++) { |
SkDisplayable* test = CreateInstance(maker, gTypeNames[index].fType); |
- if (test == NULL) |
+ if (test == nullptr) |
continue; |
#if defined _WIN32 && _MSC_VER >= 1300 && defined _INC_CRTDBG // only on windows, only if using "crtdbg.h" |
// we know that crtdbg puts 0xfdfdfdfd at the end of the block |
@@ -744,7 +744,7 @@ void SkDisplayType::UnitTest() { |
for (index = 0; index < kTypeNamesSize; index++) { |
int infoCount; |
const SkMemberInfo* info = GetMembers(maker, gTypeNames[index].fType, &infoCount); |
- if (info == NULL) |
+ if (info == nullptr) |
continue; |
#if SK_USE_CONDENSED_INFO == 0 |
for (int inner = 0; inner < infoCount - 1; inner++) { |