diff options
author | 2013-06-28 11:47:01 +0000 | |
---|---|---|
committer | 2013-06-28 11:47:01 +0000 | |
commit | 6bf19415c3a3ac25a8fccb66ab5cc55d046bd042 (patch) | |
tree | 35d23233213755bec65e07d08f54b0aebae32e23 /src | |
parent | c9f6a1a1c53fff440988c4f5c499ec98c3c7c362 (diff) |
Clang has stricter checking for conversion to a null pointer. In C++11 mode, false will produce an error if it is used in a place that expects a pointer. Change these cases to NULL.
R=reed@google.com, robertphillips@google.com
Author: rtrieu@google.com
Review URL: https://chromiumcodereview.appspot.com/18118004
git-svn-id: http://skia.googlecode.com/svn/trunk@9800 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src')
-rw-r--r-- | src/animator/SkAnimatorScript.cpp | 2 | ||||
-rw-r--r-- | src/animator/SkScriptRuntime.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/animator/SkAnimatorScript.cpp b/src/animator/SkAnimatorScript.cpp index 67c53c7654..df2e5637a2 100644 --- a/src/animator/SkAnimatorScript.cpp +++ b/src/animator/SkAnimatorScript.cpp @@ -165,7 +165,7 @@ bool SkAnimatorScript::EvalID(const char* token, size_t len, void* user, SkScrip displayable = engine->fWorking; if (SK_LITERAL_STR_EQUAL("parent", token, len)) { SkDisplayable* parent = displayable->getParent(); - if (parent == false) + if (parent == NULL) parent = engine->fParent; if (parent) { value->fOperand.fDisplayable = parent; diff --git a/src/animator/SkScriptRuntime.cpp b/src/animator/SkScriptRuntime.cpp index f28785010f..061847ec12 100644 --- a/src/animator/SkScriptRuntime.cpp +++ b/src/animator/SkScriptRuntime.cpp @@ -200,13 +200,13 @@ bool SkScriptRuntime::executeTokens(unsigned char* opCode) { operand[0].fScalar = SkScriptEngine2::IntToScalar(operand[op - SkScriptEngine2::kIntToScalar].fS32); break; case SkScriptEngine2::kStringToInt: - if (SkParse::FindS32(operand[0].fString->c_str(), &operand[0].fS32) == false) + if (SkParse::FindS32(operand[0].fString->c_str(), &operand[0].fS32) == NULL) return false; break; case SkScriptEngine2::kStringToScalar: case SkScriptEngine2::kStringToScalar2: if (SkParse::FindScalar(operand[0].fString->c_str(), - &operand[op - SkScriptEngine2::kStringToScalar].fScalar) == false) + &operand[op - SkScriptEngine2::kStringToScalar].fScalar) == NULL) return false; break; case SkScriptEngine2::kScalarToInt: |