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 --- include/ports/SkFontConfigInterface.h | 2 +- include/ports/SkFontMgr_indirect.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'include/ports') diff --git a/include/ports/SkFontConfigInterface.h b/include/ports/SkFontConfigInterface.h index 3e279d45b8..c6b7b78628 100644 --- a/include/ports/SkFontConfigInterface.h +++ b/include/ports/SkFontConfigInterface.h @@ -62,7 +62,7 @@ public: // If buffer is NULL, just return the number of bytes that would have // been written. Will pad contents to a multiple of 4. - size_t writeToMemory(void* buffer = NULL) const; + size_t writeToMemory(void* buffer = nullptr) const; // Recreate from a flattened buffer, returning the number of bytes read. size_t readFromMemory(const void* buffer, size_t length); diff --git a/include/ports/SkFontMgr_indirect.h b/include/ports/SkFontMgr_indirect.h index b9ab3ba913..251d74a83a 100644 --- a/include/ports/SkFontMgr_indirect.h +++ b/include/ports/SkFontMgr_indirect.h @@ -76,7 +76,7 @@ private: { SkDEBUGCODE(that.fDataId = SkFontIdentity::kInvalidDataId;) SkDEBUGCODE(that.fTtcIndex = 0xbbadbeef;) - that.fTypeface = NULL; + that.fTypeface = nullptr; } ~DataEntry() { -- cgit v1.2.3