From a93a14a99816d25b773f0b12868143702baf44bf Mon Sep 17 00:00:00 2001 From: Ben Wagner Date: Mon, 28 Aug 2017 10:34:05 -0400 Subject: Convert NULL and 0 to nullptr. This was created by looking at warnings produced by clang's -Wzero-as-null-pointer-constant. This updates most issues in Skia code. However, there are places where GL and Vulkan want pointer values which are explicitly 0, external headers which use NULL directly, and possibly more uses in un-compiled sources (for other platforms). Change-Id: Id22fbac04d5c53497a53d734f0896b4f06fe8345 Reviewed-on: https://skia-review.googlesource.com/39521 Reviewed-by: Mike Reed Commit-Queue: Ben Wagner --- src/xml/SkDOM.h | 6 +++--- src/xml/SkXMLParser.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/xml') diff --git a/src/xml/SkDOM.h b/src/xml/SkDOM.h index e72bcadea8..c3862a3ada 100644 --- a/src/xml/SkDOM.h +++ b/src/xml/SkDOM.h @@ -45,8 +45,8 @@ public: Type getType(const Node*) const; const char* getName(const Node*) const; - const Node* getFirstChild(const Node*, const char elem[] = NULL) const; - const Node* getNextSibling(const Node*, const char elem[] = NULL) const; + const Node* getFirstChild(const Node*, const char elem[] = nullptr) const; + const Node* getNextSibling(const Node*, const char elem[] = nullptr) const; const char* findAttr(const Node*, const char attrName[]) const; const Attr* getFirstAttr(const Node*) const; @@ -55,7 +55,7 @@ public: const char* getAttrValue(const Node*, const Attr*) const; // helpers for walking children - int countChildren(const Node* node, const char elem[] = NULL) const; + int countChildren(const Node* node, const char elem[] = nullptr) const; // helpers for calling SkParse bool findS32(const Node*, const char name[], int32_t* value) const; diff --git a/src/xml/SkXMLParser.h b/src/xml/SkXMLParser.h index 3f69013ce6..a20c7631e1 100644 --- a/src/xml/SkXMLParser.h +++ b/src/xml/SkXMLParser.h @@ -53,7 +53,7 @@ private: class SkXMLParser { public: - SkXMLParser(SkXMLParserError* parserError = NULL); + SkXMLParser(SkXMLParserError* parserError = nullptr); virtual ~SkXMLParser(); /** Returns true for success -- cgit v1.2.3