From 8b0d642e6610dd44f98a986580451eb562276897 Mon Sep 17 00:00:00 2001 From: Ebrahim Byagowi Date: Mon, 23 Apr 2018 18:37:35 +0430 Subject: [PATCH] Resolve some of clang's zero-as-null-pointer-constant warnings --- src/hb-coretext.cc | 4 ++-- src/hb-dsalgs.hh | 2 +- src/hb-ot-os2-unicode-ranges.hh | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/hb-coretext.cc b/src/hb-coretext.cc index 7055e5f79..bb9b5ca22 100644 --- a/src/hb-coretext.cc +++ b/src/hb-coretext.cc @@ -210,7 +210,7 @@ create_ct_font (CGFontRef cg_font, CGFloat font_size) return ct_font; } - CFURLRef original_url = NULL; + CFURLRef original_url = nullptr; #if MAC_OS_X_VERSION_MIN_REQUIRED < 1060 ATSFontRef atsFont; FSRef fsref; @@ -240,7 +240,7 @@ create_ct_font (CGFontRef cg_font, CGFloat font_size) * system locations that we cannot access from the sandboxed renderer * process in Blink. This can be detected by the new file URL location * that the newly found font points to. */ - CFURLRef new_url = NULL; + CFURLRef new_url = nullptr; #if MAC_OS_X_VERSION_MIN_REQUIRED < 1060 atsFont = CTFontGetPlatformFont (new_ct_font, NULL); status = ATSFontGetFileReference (atsFont, &fsref); diff --git a/src/hb-dsalgs.hh b/src/hb-dsalgs.hh index e41384754..958687194 100644 --- a/src/hb-dsalgs.hh +++ b/src/hb-dsalgs.hh @@ -49,7 +49,7 @@ hb_bsearch_r (const void *key, const void *base, else return (void *) p; } - return NULL; + return nullptr; } diff --git a/src/hb-ot-os2-unicode-ranges.hh b/src/hb-ot-os2-unicode-ranges.hh index 2cf168f9c..9b32cfabb 100644 --- a/src/hb-ot-os2-unicode-ranges.hh +++ b/src/hb-ot-os2-unicode-ranges.hh @@ -237,7 +237,7 @@ hb_get_unicode_range_bit (hb_codepoint_t cp) sizeof (os2UnicodeRangesSorted) / sizeof(Range), sizeof(Range), _compare_range, nullptr); - if (range != NULL) + if (range != nullptr) return range->bit; return -1; }