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

Unified Diff: src/utils/SkLayer.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/utils/SkInterpolator.cpp ('k') | src/utils/SkLua.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/utils/SkLayer.cpp
diff --git a/src/utils/SkLayer.cpp b/src/utils/SkLayer.cpp
index 525917ff66d211afcdcbd2a268f79a30462cac6b..39032b616e097a305d6f11d5776087499fa62142 100644
--- a/src/utils/SkLayer.cpp
+++ b/src/utils/SkLayer.cpp
@@ -18,7 +18,7 @@
///////////////////////////////////////////////////////////////////////////////
SkLayer::SkLayer() {
- fParent = NULL;
+ fParent = nullptr;
m_opacity = SK_Scalar1;
m_size.set(0, 0);
m_position.set(0, 0);
@@ -35,7 +35,7 @@ SkLayer::SkLayer() {
}
SkLayer::SkLayer(const SkLayer& src) : INHERITED() {
- fParent = NULL;
+ fParent = nullptr;
m_opacity = src.m_opacity;
m_size = src.m_size;
m_position = src.m_position;
@@ -93,14 +93,14 @@ SkLayer* SkLayer::getChild(int index) const {
SkASSERT(m_children[index]->fParent == this);
return m_children[index];
}
- return NULL;
+ return nullptr;
}
SkLayer* SkLayer::addChild(SkLayer* child) {
SkASSERT(this != child);
child->ref();
child->detachFromParent();
- SkASSERT(child->fParent == NULL);
+ SkASSERT(child->fParent == nullptr);
child->fParent = this;
*m_children.append() = child;
@@ -112,7 +112,7 @@ void SkLayer::detachFromParent() {
int index = fParent->m_children.find(this);
SkASSERT(index >= 0);
fParent->m_children.remove(index);
- fParent = NULL;
+ fParent = nullptr;
this->unref(); // this call might delete us
}
}
@@ -122,7 +122,7 @@ void SkLayer::removeChildren() {
for (int i = 0; i < count; i++) {
SkLayer* child = m_children[i];
SkASSERT(child->fParent == this);
- child->fParent = NULL; // in case it has more than one owner
+ child->fParent = nullptr; // in case it has more than one owner
child->unref();
}
m_children.reset();
@@ -130,7 +130,7 @@ void SkLayer::removeChildren() {
SkLayer* SkLayer::getRootLayer() const {
const SkLayer* root = this;
- while (root->fParent != NULL) {
+ while (root->fParent != nullptr) {
root = root->fParent;
}
return const_cast<SkLayer*>(root);
@@ -157,7 +157,7 @@ void SkLayer::localToGlobal(SkMatrix* matrix) const {
}
const SkLayer* layer = this;
- while (layer->fParent != NULL) {
+ while (layer->fParent != nullptr) {
layer = layer->fParent;
SkMatrix tmp;
« no previous file with comments | « src/utils/SkInterpolator.cpp ('k') | src/utils/SkLua.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698