Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1207)

Unified Diff: core/fxcrt/include/fx_memory.h

Issue 2031653003: Get rid of NULLs in fpdfsdk/ (Closed) Base URL: https://pdfium.googlesource.com/pdfium@nullptr_core
Patch Set: rebase Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/fxcrt/fx_basic_bstring_unittest.cpp ('k') | fpdfsdk/formfiller/cba_fontmap.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fxcrt/include/fx_memory.h
diff --git a/core/fxcrt/include/fx_memory.h b/core/fxcrt/include/fx_memory.h
index 3048897d762bc7036d1a0be84ff3883552134032..fa8da6067c53d0cb6a5fd4f7fcbffbde8b3b581d 100644
--- a/core/fxcrt/include/fx_memory.h
+++ b/core/fxcrt/include/fx_memory.h
@@ -13,7 +13,7 @@
extern "C" {
#endif
-// For external C libraries to malloc through PDFium. These may return NULL.
+// For external C libraries to malloc through PDFium. These may return nullptr.
void* FXMEM_DefaultAlloc(size_t byte_size, int flags);
void* FXMEM_DefaultRealloc(void* pointer, size_t new_size, int flags);
void FXMEM_DefaultFree(void* pointer, int flags);
@@ -61,13 +61,13 @@ inline void* FX_ReallocOrDie(void* ptr,
return nullptr; // Suppress compiler warning.
}
-// Never returns NULL.
+// Never returns nullptr.
#define FX_Alloc(type, size) (type*) FX_AllocOrDie(size, sizeof(type))
#define FX_Alloc2D(type, w, h) (type*) FX_AllocOrDie2D(w, h, sizeof(type))
#define FX_Realloc(type, ptr, size) \
(type*) FX_ReallocOrDie(ptr, size, sizeof(type))
-// May return NULL.
+// May return nullptr.
#define FX_TryAlloc(type, size) (type*) calloc(size, sizeof(type))
#define FX_TryRealloc(type, ptr, size) \
(type*) FX_SafeRealloc(ptr, size, sizeof(type))
« no previous file with comments | « core/fxcrt/fx_basic_bstring_unittest.cpp ('k') | fpdfsdk/formfiller/cba_fontmap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698