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

Unified Diff: samplecode/SampleAnimator.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 | « samplecode/SampleAll.cpp ('k') | samplecode/SampleApp.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
}
}
« no previous file with comments | « samplecode/SampleAll.cpp ('k') | samplecode/SampleApp.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698