Index: samplecode/SampleAnimator.cpp |
diff --git a/samplecode/SampleAnimator.cpp b/samplecode/SampleAnimator.cpp |
index a7cc8851ea462bcac0353846f89a0a31060ab44d..8b7af68cb332a0b46afefe6afed27b925711cb3d 100644 |
--- a/samplecode/SampleAnimator.cpp |
+++ b/samplecode/SampleAnimator.cpp |
@@ -40,7 +40,7 @@ private: |
typedef SkView INHERITED; |
}; |
-SkAnimatorView::SkAnimatorView() : fAnimator(NULL) {} |
+SkAnimatorView::SkAnimatorView() : fAnimator(nullptr) {} |
SkAnimatorView::~SkAnimatorView() { |
delete fAnimator; |
@@ -52,7 +52,7 @@ void SkAnimatorView::setURIBase(const char dir[]) { |
bool SkAnimatorView::decodeFile(const char path[]) { |
SkAutoTDelete<SkStream> is(SkStream::NewFromFile(path)); |
- return is.get() != NULL && this->decodeStream(is); |
+ return is.get() != nullptr && this->decodeStream(is); |
} |
bool SkAnimatorView::decodeMemory(const void* buffer, size_t size) { |
@@ -62,7 +62,7 @@ bool SkAnimatorView::decodeMemory(const void* buffer, size_t size) { |
static const SkDOMNode* find_nodeID(const SkDOM& dom, |
const SkDOMNode* node, const char name[]) { |
- if (NULL == node) { |
+ if (nullptr == node) { |
node = dom.getRootNode(); |
} |
do { |
@@ -77,8 +77,8 @@ static const SkDOMNode* find_nodeID(const SkDOM& dom, |
return found; |
} |
} |
- } while ((node = dom.getNextSibling(node)) != NULL); |
- return NULL; |
+ } while ((node = dom.getNextSibling(node)) != nullptr); |
+ return nullptr; |
} |
bool SkAnimatorView::decodeStream(SkStream* stream) { |
@@ -88,7 +88,7 @@ bool SkAnimatorView::decodeStream(SkStream* stream) { |
#if 0 |
if (!fAnimator->decodeStream(stream)) { |
delete fAnimator; |
- fAnimator = NULL; |
+ fAnimator = nullptr; |
return false; |
} |
#else |
@@ -97,18 +97,18 @@ bool SkAnimatorView::decodeStream(SkStream* stream) { |
stream->read(text, len); |
SkDOM dom; |
const SkDOM::Node* root = dom.build(text, len); |
- if (NULL == root) { |
+ if (nullptr == root) { |
return false; |
} |
if (!fAnimator->decodeDOM(dom, root)) { |
delete fAnimator; |
- fAnimator = NULL; |
+ fAnimator = nullptr; |
return false; |
} |
for (int i = 0; i <= 10; i++) { |
SkString name("glyph"); |
name.appendS32(i); |
- const SkDOM::Node* node = find_nodeID(dom, NULL, name.c_str()); |
+ const SkDOM::Node* node = find_nodeID(dom, nullptr, name.c_str()); |
SkASSERT(node); |
SkRect r; |
dom.findScalar(node, "left", &r.fLeft); |
@@ -141,7 +141,7 @@ void SkAnimatorView::onDraw(SkCanvas* canvas) { |
fAnimator->draw(canvas, 0); |
canvas->restore(); |
- this->inval(NULL); |
+ this->inval(nullptr); |
#endif |
} |
} |