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

Unified Diff: src/animator/SkAnimatorScript2.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/animator/SkAnimatorScript.cpp ('k') | src/animator/SkBoundable.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/animator/SkAnimatorScript2.cpp
diff --git a/src/animator/SkAnimatorScript2.cpp b/src/animator/SkAnimatorScript2.cpp
index 700027aec03e735851be893e6beb8fb83cc19c29..d246130fbe3f785bfe68c931157689137f4962fc 100644
--- a/src/animator/SkAnimatorScript2.cpp
+++ b/src/animator/SkAnimatorScript2.cpp
@@ -205,7 +205,7 @@ public:
return true;
}
const SkMemberInfo* info = displayable->getMember(name.c_str());
- if (info == NULL)
+ if (info == nullptr)
return false; // !!! add additional error info?
ref->fType = SkAnimatorScript2::ToOpType(info->getType());
ref->fOperand.fObject = (void*) info;
@@ -235,7 +235,7 @@ public:
SkDisplayable* displayable = (SkDisplayable*) object;
SkString name(member, len);
const SkMemberInfo* info = displayable->getMember(name.c_str());
- if (info == NULL || info->fType != SkType_MemberFunction)
+ if (info == nullptr || info->fType != SkType_MemberFunction)
return false; // !!! add additional error info?
ref->fType = SkAnimatorScript2::ToOpType(info->getType());
ref->fOperand.fObject = (void*) info;
@@ -264,7 +264,7 @@ public:
class SkAnimatorScript_NamedColor : public SkScriptCallBackProperty {
public:
virtual bool getConstValue(const char* name, int len, SkOperand2* value) {
- return SkParse::FindNamedColor(name, len, (SkColor*) &value->fS32) != NULL;
+ return SkParse::FindNamedColor(name, len, (SkColor*) &value->fS32) != nullptr;
}
};
@@ -474,9 +474,9 @@ SkDisplayTypes SkAnimatorScript2::ToDisplayType(SkOperand2::OpType type) {
}
SkOperand2::OpType SkAnimatorScript2::ToOpType(SkDisplayTypes type) {
- if (SkDisplayType::IsDisplayable(NULL /* fMaker */, type))
+ if (SkDisplayType::IsDisplayable(nullptr /* fMaker */, type))
return SkOperand2::kObject;
- if (SkDisplayType::IsEnum(NULL /* fMaker */, type))
+ if (SkDisplayType::IsEnum(nullptr /* fMaker */, type))
return SkOperand2::kS32;
switch (type) {
case SkType_ARGB:
@@ -506,7 +506,7 @@ bool SkAnimatorScript2::MapEnums(const char* ptr, const char* match, size_t len,
bool more = true;
do {
const char* last = strchr(ptr, '|');
- if (last == NULL) {
+ if (last == nullptr) {
last = &ptr[strlen(ptr)];
more = false;
}
@@ -591,7 +591,7 @@ void SkAnimatorScript2::UnitTest() {
animator.doUserEvent(evt);
// set up animator with memory script above, then run value tests
for (int index = 0; index < SkScriptNAnswer_testCount; index++) {
- SkAnimatorScript2 engine(*animator.fMaker, NULL, scriptTests[index].fType);
+ SkAnimatorScript2 engine(*animator.fMaker, nullptr, scriptTests[index].fType);
SkScriptValue2 value;
const char* script = scriptTests[index].fScript;
bool success = engine.evaluateScript(&script, &value);
« no previous file with comments | « src/animator/SkAnimatorScript.cpp ('k') | src/animator/SkBoundable.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698