From 4997b22f84307521a62838f874928bf56cd3423c Mon Sep 17 00:00:00 2001 From: thestig Date: Tue, 7 Jun 2016 10:46:22 -0700 Subject: Get rid of NULLs in core/ Review-Url: https://codereview.chromium.org/2032613003 --- core/fxge/include/fx_dib.h | 62 ++++++++++++++++++++--------------------- core/fxge/include/fx_font.h | 2 +- core/fxge/include/fx_ge.h | 24 ++++++++-------- core/fxge/include/fx_ge_win32.h | 2 +- 4 files changed, 45 insertions(+), 45 deletions(-) (limited to 'core/fxge/include') diff --git a/core/fxge/include/fx_dib.h b/core/fxge/include/fx_dib.h index 12ed03c1d3..4919ba70fe 100644 --- a/core/fxge/include/fx_dib.h +++ b/core/fxge/include/fx_dib.h @@ -204,28 +204,28 @@ class CFX_DIBSource { void CopyPalette(const uint32_t* pSrcPal, uint32_t size = 256); - CFX_DIBitmap* Clone(const FX_RECT* pClip = NULL) const; + CFX_DIBitmap* Clone(const FX_RECT* pClip = nullptr) const; CFX_DIBitmap* CloneConvert(FXDIB_Format format, - const FX_RECT* pClip = NULL, - void* pIccTransform = NULL) const; + const FX_RECT* pClip = nullptr, + void* pIccTransform = nullptr) const; CFX_DIBitmap* StretchTo(int dest_width, int dest_height, uint32_t flags = 0, - const FX_RECT* pClip = NULL) const; + const FX_RECT* pClip = nullptr) const; CFX_DIBitmap* TransformTo(const CFX_Matrix* pMatrix, int& left, int& top, uint32_t flags = 0, - const FX_RECT* pClip = NULL) const; + const FX_RECT* pClip = nullptr) const; - CFX_DIBitmap* GetAlphaMask(const FX_RECT* pClip = NULL) const; + CFX_DIBitmap* GetAlphaMask(const FX_RECT* pClip = nullptr) const; FX_BOOL CopyAlphaMask(const CFX_DIBSource* pAlphaMask, - const FX_RECT* pClip = NULL); + const FX_RECT* pClip = nullptr); CFX_DIBitmap* SwapXY(FX_BOOL bXFlip, FX_BOOL bYFlip, - const FX_RECT* pClip = NULL) const; + const FX_RECT* pClip = nullptr) const; CFX_DIBitmap* FlipImage(FX_BOOL bXFlip, FX_BOOL bYFlip) const; @@ -266,7 +266,7 @@ class CFX_DIBitmap : public CFX_DIBSource { FX_BOOL Create(int width, int height, FXDIB_Format format, - uint8_t* pBuffer = NULL, + uint8_t* pBuffer = nullptr, int pitch = 0); FX_BOOL Copy(const CFX_DIBSource* pSrc); @@ -284,7 +284,7 @@ class CFX_DIBitmap : public CFX_DIBSource { void TakeOver(CFX_DIBitmap* pSrcBitmap); - FX_BOOL ConvertFormat(FXDIB_Format format, void* pIccTransform = NULL); + FX_BOOL ConvertFormat(FXDIB_Format format, void* pIccTransform = nullptr); void Clear(uint32_t color); @@ -309,7 +309,7 @@ class CFX_DIBitmap : public CFX_DIBSource { const CFX_DIBSource* pSrcBitmap, int src_left, int src_top, - void* pIccTransform = NULL); + void* pIccTransform = nullptr); FX_BOOL CompositeBitmap(int dest_left, int dest_top, @@ -319,9 +319,9 @@ class CFX_DIBitmap : public CFX_DIBSource { int src_left, int src_top, int blend_type = FXDIB_BLEND_NORMAL, - const CFX_ClipRgn* pClipRgn = NULL, + const CFX_ClipRgn* pClipRgn = nullptr, FX_BOOL bRgbByteOrder = FALSE, - void* pIccTransform = NULL); + void* pIccTransform = nullptr); FX_BOOL TransferMask(int dest_left, int dest_top, @@ -332,7 +332,7 @@ class CFX_DIBitmap : public CFX_DIBSource { int src_left, int src_top, int alpha_flag = 0, - void* pIccTransform = NULL); + void* pIccTransform = nullptr); FX_BOOL CompositeMask(int dest_left, int dest_top, @@ -343,10 +343,10 @@ class CFX_DIBitmap : public CFX_DIBSource { int src_left, int src_top, int blend_type = FXDIB_BLEND_NORMAL, - const CFX_ClipRgn* pClipRgn = NULL, + const CFX_ClipRgn* pClipRgn = nullptr, FX_BOOL bRgbByteOrder = FALSE, int alpha_flag = 0, - void* pIccTransform = NULL); + void* pIccTransform = nullptr); FX_BOOL CompositeRect(int dest_left, int dest_top, @@ -354,12 +354,12 @@ class CFX_DIBitmap : public CFX_DIBSource { int height, uint32_t color, int alpha_flag = 0, - void* pIccTransform = NULL); + void* pIccTransform = nullptr); FX_BOOL ConvertColorScale(uint32_t forecolor, uint32_t backcolor); protected: - FX_BOOL GetGrayData(void* pIccTransform = NULL); + FX_BOOL GetGrayData(void* pIccTransform = nullptr); uint8_t* m_pBuffer; FX_BOOL m_bExtBuf; @@ -421,7 +421,7 @@ class IFX_ScanlineComposer { virtual void ComposeScanline(int line, const uint8_t* scanline, - const uint8_t* scan_extra_alpha = NULL) = 0; + const uint8_t* scan_extra_alpha = nullptr) = 0; virtual FX_BOOL SetInfo(int width, int height, @@ -443,35 +443,35 @@ class CFX_ScanlineCompositor { FX_BOOL bClip, FX_BOOL bRgbByteOrder = FALSE, int alpha_flag = 0, - void* pIccTransform = NULL); + void* pIccTransform = nullptr); void CompositeRgbBitmapLine(uint8_t* dest_scan, const uint8_t* src_scan, int width, const uint8_t* clip_scan, - const uint8_t* src_extra_alpha = NULL, - uint8_t* dst_extra_alpha = NULL); + const uint8_t* src_extra_alpha = nullptr, + uint8_t* dst_extra_alpha = nullptr); void CompositePalBitmapLine(uint8_t* dest_scan, const uint8_t* src_scan, int src_left, int width, const uint8_t* clip_scan, - const uint8_t* src_extra_alpha = NULL, - uint8_t* dst_extra_alpha = NULL); + const uint8_t* src_extra_alpha = nullptr, + uint8_t* dst_extra_alpha = nullptr); void CompositeByteMaskLine(uint8_t* dest_scan, const uint8_t* src_scan, int width, const uint8_t* clip_scan, - uint8_t* dst_extra_alpha = NULL); + uint8_t* dst_extra_alpha = nullptr); void CompositeBitMaskLine(uint8_t* dest_scan, const uint8_t* src_scan, int src_left, int width, const uint8_t* clip_scan, - uint8_t* dst_extra_alpha = NULL); + uint8_t* dst_extra_alpha = nullptr); protected: int m_Transparency; @@ -501,7 +501,7 @@ class CFX_BitmapComposer : public IFX_ScanlineComposer { FX_BOOL bFlipY, FX_BOOL bRgbByteOrder = FALSE, int alpha_flag = 0, - void* pIccTransform = NULL, + void* pIccTransform = nullptr, int blend_type = FXDIB_BLEND_NORMAL); // IFX_ScanlineComposer @@ -519,8 +519,8 @@ class CFX_BitmapComposer : public IFX_ScanlineComposer { const uint8_t* src_scan, int dest_width, const uint8_t* clip_scan, - const uint8_t* src_extra_alpha = NULL, - uint8_t* dst_extra_alpha = NULL); + const uint8_t* src_extra_alpha = nullptr, + uint8_t* dst_extra_alpha = nullptr); CFX_DIBitmap* m_pBitmap; const CFX_ClipRgn* m_pClipRgn; FXDIB_Format m_SrcFormat; @@ -535,7 +535,7 @@ class CFX_BitmapComposer : public IFX_ScanlineComposer { int m_BlendType; void ComposeScanlineV(int line, const uint8_t* scanline, - const uint8_t* scan_extra_alpha = NULL); + const uint8_t* scan_extra_alpha = nullptr); uint8_t* m_pScanlineV; uint8_t* m_pClipScanV; uint8_t* m_pAddClipScan; @@ -642,7 +642,7 @@ class CFX_ImageRenderer { uint32_t dib_flags, FX_BOOL bRgbByteOrder = FALSE, int alpha_flag = 0, - void* pIccTransform = NULL, + void* pIccTransform = nullptr, int blend_type = FXDIB_BLEND_NORMAL); FX_BOOL Continue(IFX_Pause* pPause); diff --git a/core/fxge/include/fx_font.h b/core/fxge/include/fx_font.h index 023a6a0928..13143d518b 100644 --- a/core/fxge/include/fx_font.h +++ b/core/fxge/include/fx_font.h @@ -83,7 +83,7 @@ class CFX_Font { #ifdef PDF_ENABLE_XFA FX_BOOL LoadFile(IFX_FileRead* pFile, int nFaceIndex = 0, - int* pFaceCount = NULL); + int* pFaceCount = nullptr); FX_BOOL LoadClone(const CFX_Font* pFont); CFX_SubstFont* GetSubstFont() const { return m_pSubstFont; } diff --git a/core/fxge/include/fx_ge.h b/core/fxge/include/fx_ge.h index 1cbbc2cc97..040c16afa2 100644 --- a/core/fxge/include/fx_ge.h +++ b/core/fxge/include/fx_ge.h @@ -424,7 +424,7 @@ class IFX_RenderDeviceDriver { static IFX_RenderDeviceDriver* CreateFxgeDriver( CFX_DIBitmap* pBitmap, FX_BOOL bRgbByteOrder = FALSE, - CFX_DIBitmap* pOriDevice = NULL, + CFX_DIBitmap* pOriDevice = nullptr, FX_BOOL bGroupKnockout = FALSE); virtual ~IFX_RenderDeviceDriver() {} @@ -458,21 +458,21 @@ class IFX_RenderDeviceDriver { uint32_t stroke_color, int fill_mode, int alpha_flag = 0, - void* pIccTransform = NULL, + void* pIccTransform = nullptr, int blend_type = FXDIB_BLEND_NORMAL) = 0; virtual FX_BOOL SetPixel(int x, int y, uint32_t color, int alpha_flag = 0, - void* pIccTransform = NULL) { + void* pIccTransform = nullptr) { return FALSE; } virtual FX_BOOL FillRect(const FX_RECT* pRect, uint32_t fill_color, int alpha_flag = 0, - void* pIccTransform = NULL, + void* pIccTransform = nullptr, int blend_type = FXDIB_BLEND_NORMAL) { return FALSE; } @@ -483,7 +483,7 @@ class IFX_RenderDeviceDriver { FX_FLOAT y2, uint32_t color, int alpha_flag = 0, - void* pIccTransform = NULL, + void* pIccTransform = nullptr, int blend_type = FXDIB_BLEND_NORMAL) { return FALSE; } @@ -493,11 +493,11 @@ class IFX_RenderDeviceDriver { virtual FX_BOOL GetDIBits(CFX_DIBitmap* pBitmap, int left, int top, - void* pIccTransform = NULL, + void* pIccTransform = nullptr, FX_BOOL bDEdge = FALSE) { return FALSE; } - virtual CFX_DIBitmap* GetBackDrop() { return NULL; } + virtual CFX_DIBitmap* GetBackDrop() { return nullptr; } virtual FX_BOOL SetDIBits(const CFX_DIBSource* pBitmap, uint32_t color, @@ -506,7 +506,7 @@ class IFX_RenderDeviceDriver { int dest_top, int blend_type, int alpha_flag = 0, - void* pIccTransform = NULL) = 0; + void* pIccTransform = nullptr) = 0; virtual FX_BOOL StretchDIBits(const CFX_DIBSource* pBitmap, uint32_t color, @@ -517,7 +517,7 @@ class IFX_RenderDeviceDriver { const FX_RECT* pClipRect, uint32_t flags, int alpha_flag = 0, - void* pIccTransform = NULL, + void* pIccTransform = nullptr, int blend_type = FXDIB_BLEND_NORMAL) = 0; virtual FX_BOOL StartDIBits(const CFX_DIBSource* pBitmap, @@ -527,7 +527,7 @@ class IFX_RenderDeviceDriver { uint32_t flags, void*& handle, int alpha_flag = 0, - void* pIccTransform = NULL, + void* pIccTransform = nullptr, int blend_type = FXDIB_BLEND_NORMAL) = 0; virtual FX_BOOL ContinueDIBits(void* handle, IFX_Pause* pPause) { @@ -544,11 +544,11 @@ class IFX_RenderDeviceDriver { FX_FLOAT font_size, uint32_t color, int alpha_flag = 0, - void* pIccTransform = NULL) { + void* pIccTransform = nullptr) { return FALSE; } - virtual void* GetPlatformSurface() const { return NULL; } + virtual void* GetPlatformSurface() const { return nullptr; } virtual int GetDriverType() const { return 0; } virtual void ClearDriver() {} diff --git a/core/fxge/include/fx_ge_win32.h b/core/fxge/include/fx_ge_win32.h index a6d8fbb378..e7207a5f70 100644 --- a/core/fxge/include/fx_ge_win32.h +++ b/core/fxge/include/fx_ge_win32.h @@ -33,7 +33,7 @@ class CFX_WindowsDIB : public CFX_DIBitmap { static CFX_DIBitmap* LoadFromDDB(HDC hDC, HBITMAP hBitmap, - uint32_t* pPalette = NULL, + uint32_t* pPalette = nullptr, uint32_t size = 256); static CFX_DIBitmap* LoadFromFile(const FX_WCHAR* filename); -- cgit v1.2.3