提交 8b0d642e 编写于 作者: E Ebrahim Byagowi 提交者: Behdad Esfahbod

Resolve some of clang's zero-as-null-pointer-constant warnings

上级 8100380d
...@@ -210,7 +210,7 @@ create_ct_font (CGFontRef cg_font, CGFloat font_size) ...@@ -210,7 +210,7 @@ create_ct_font (CGFontRef cg_font, CGFloat font_size)
return ct_font; return ct_font;
} }
CFURLRef original_url = NULL; CFURLRef original_url = nullptr;
#if MAC_OS_X_VERSION_MIN_REQUIRED < 1060 #if MAC_OS_X_VERSION_MIN_REQUIRED < 1060
ATSFontRef atsFont; ATSFontRef atsFont;
FSRef fsref; FSRef fsref;
...@@ -240,7 +240,7 @@ create_ct_font (CGFontRef cg_font, CGFloat font_size) ...@@ -240,7 +240,7 @@ create_ct_font (CGFontRef cg_font, CGFloat font_size)
* system locations that we cannot access from the sandboxed renderer * system locations that we cannot access from the sandboxed renderer
* process in Blink. This can be detected by the new file URL location * process in Blink. This can be detected by the new file URL location
* that the newly found font points to. */ * that the newly found font points to. */
CFURLRef new_url = NULL; CFURLRef new_url = nullptr;
#if MAC_OS_X_VERSION_MIN_REQUIRED < 1060 #if MAC_OS_X_VERSION_MIN_REQUIRED < 1060
atsFont = CTFontGetPlatformFont (new_ct_font, NULL); atsFont = CTFontGetPlatformFont (new_ct_font, NULL);
status = ATSFontGetFileReference (atsFont, &fsref); status = ATSFontGetFileReference (atsFont, &fsref);
......
...@@ -49,7 +49,7 @@ hb_bsearch_r (const void *key, const void *base, ...@@ -49,7 +49,7 @@ hb_bsearch_r (const void *key, const void *base,
else else
return (void *) p; return (void *) p;
} }
return NULL; return nullptr;
} }
......
...@@ -237,7 +237,7 @@ hb_get_unicode_range_bit (hb_codepoint_t cp) ...@@ -237,7 +237,7 @@ hb_get_unicode_range_bit (hb_codepoint_t cp)
sizeof (os2UnicodeRangesSorted) / sizeof(Range), sizeof (os2UnicodeRangesSorted) / sizeof(Range),
sizeof(Range), sizeof(Range),
_compare_range, nullptr); _compare_range, nullptr);
if (range != NULL) if (range != nullptr)
return range->bit; return range->bit;
return -1; return -1;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册