| Index: src/views/SkViewInflate.cpp
|
| diff --git a/src/views/SkViewInflate.cpp b/src/views/SkViewInflate.cpp
|
| index 59cc4813fa5281c142fb331af4afcd62df6766cb..8418fb0e720517dae2cfc0f231827c88993b4c0a 100644
|
| --- a/src/views/SkViewInflate.cpp
|
| +++ b/src/views/SkViewInflate.cpp
|
| @@ -37,10 +37,10 @@ void SkViewInflate::rInflate(const SkDOM& dom, const SkDOM::Node* node, SkView*
|
| const char* name = dom.getName(child);
|
| const char* target;
|
|
|
| - if (!strcmp(name, "listenTo") && (target = dom.findAttr(child, "target")) != NULL)
|
| + if (!strcmp(name, "listenTo") && (target = dom.findAttr(child, "target")) != nullptr)
|
| this->addIDStr(&fListenTo, parent, target);
|
|
|
| - if (!strcmp(name, "broadcastTo") && (target = dom.findAttr(child, "target")) != NULL)
|
| + if (!strcmp(name, "broadcastTo") && (target = dom.findAttr(child, "target")) != nullptr)
|
| this->addIDStr(&fBroadcastTo, parent, target);
|
| }
|
| child = dom.getNextSibling(child);
|
| @@ -62,13 +62,13 @@ SkView* SkViewInflate::inflate(const SkDOM& dom, const SkDOM::Node* node, SkView
|
| {
|
| fIDs.reset();
|
|
|
| - if (root == NULL)
|
| + if (root == nullptr)
|
| {
|
| root = this->createView(dom, node);
|
| - if (root == NULL)
|
| + if (root == nullptr)
|
| {
|
| - printf("createView returned NULL on <%s>\n", dom.getName(node));
|
| - return NULL;
|
| + printf("createView returned nullptr on <%s>\n", dom.getName(node));
|
| + return nullptr;
|
| }
|
| }
|
| this->rInflate(dom, node, root);
|
| @@ -103,21 +103,21 @@ SkView* SkViewInflate::inflate(const char xml[], size_t len, SkView* root)
|
| SkDOM dom;
|
| const SkDOM::Node* node = dom.build(xml, len);
|
|
|
| - return node ? this->inflate(dom, node, root) : NULL;
|
| + return node ? this->inflate(dom, node, root) : nullptr;
|
| }
|
|
|
| SkView* SkViewInflate::findViewByID(const char id[]) const
|
| {
|
| SkASSERT(id);
|
| SkView* view;
|
| - return fIDs.find(id, &view) ? view : NULL;
|
| + return fIDs.find(id, &view) ? view : nullptr;
|
| }
|
|
|
| SkView* SkViewInflate::createView(const SkDOM& dom, const SkDOM::Node* node)
|
| {
|
| if (!strcmp(dom.getName(node), "view"))
|
| return new SkView;
|
| - return NULL;
|
| + return nullptr;
|
| }
|
|
|
| void SkViewInflate::addIDStr(SkTDArray<IDStr>* list, SkView* view, const char* str)
|
|
|