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

Unified Diff: src/core/SkRTree.cpp

Issue 544233002: "NULL !=" = NULL (Closed) Base URL: https://skia.googlesource.com/skia.git@are
Patch Set: rebase Created 6 years, 3 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/core/SkPoint.cpp ('k') | src/core/SkRecordDraw.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkRTree.cpp
diff --git a/src/core/SkRTree.cpp b/src/core/SkRTree.cpp
index 77f94e2eed68fe1cdd622158ce1a9b80390d17ee..17872badc398e34c1f46f3061f44100ddb468ace 100644
--- a/src/core/SkRTree.cpp
+++ b/src/core/SkRTree.cpp
@@ -75,7 +75,7 @@ void SkRTree::insert(void* data, const SkRect& fbounds, bool defer) {
Branch* newSibling = insert(fRoot.fChild.subtree, &newBranch);
fRoot.fBounds = this->computeBounds(fRoot.fChild.subtree);
- if (NULL != newSibling) {
+ if (newSibling) {
Node* oldRoot = fRoot.fChild.subtree;
Node* newRoot = this->allocateNode(oldRoot->fLevel + 1);
newRoot->fNumChildren = 2;
@@ -143,7 +143,7 @@ SkRTree::Branch* SkRTree::insert(Node* root, Branch* branch, uint16_t level) {
root->child(childIndex)->fBounds = this->computeBounds(
root->child(childIndex)->fChild.subtree);
}
- if (NULL != toInsert) {
+ if (toInsert) {
if (root->fNumChildren == fMaxChildren) {
// handle overflow by splitting. TODO: opportunistic reinsertion
« no previous file with comments | « src/core/SkPoint.cpp ('k') | src/core/SkRecordDraw.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698