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

Unified Diff: xfa/fde/fde_gedevice.cpp

Issue 2031873003: Get rid of NULLs in xfa/ (Closed) Base URL: https://pdfium.googlesource.com/pdfium@nullptr_fpdfsdk
Patch Set: 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 | « xfa/fde/fde_gedevice.h ('k') | xfa/fde/fde_iterator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fde/fde_gedevice.cpp
diff --git a/xfa/fde/fde_gedevice.cpp b/xfa/fde/fde_gedevice.cpp
index 005387f83a6437649c574213e01d0d052266b650..9531b63fbd22aa226fb8a39bd9718cba4ec6f528 100644
--- a/xfa/fde/fde_gedevice.cpp
+++ b/xfa/fde/fde_gedevice.cpp
@@ -59,7 +59,7 @@ FX_BOOL CFDE_RenderDevice::SetClipPath(const CFDE_Path* pClip) {
return FALSE;
}
CFDE_Path* CFDE_RenderDevice::GetClipPath() const {
- return NULL;
+ return nullptr;
}
FX_FLOAT CFDE_RenderDevice::GetDpiX() const {
return 96;
@@ -72,7 +72,7 @@ FX_BOOL CFDE_RenderDevice::DrawImage(CFX_DIBSource* pDib,
const CFX_RectF& dstRect,
const CFX_Matrix* pImgMatrix,
const CFX_Matrix* pDevMatrix) {
- ASSERT(pDib != NULL);
+ ASSERT(pDib);
CFX_RectF srcRect;
if (pSrcRect) {
srcRect = *pSrcRect;
@@ -95,13 +95,13 @@ FX_BOOL CFDE_RenderDevice::DrawImage(CFX_DIBSource* pDib,
if (pDevMatrix) {
dib2fxdev.Concat(*pDevMatrix);
}
- void* handle = NULL;
+ void* handle = nullptr;
m_pDevice->StartDIBits(pDib, 255, 0, (const CFX_Matrix*)&dib2fxdev, 0,
handle);
- while (m_pDevice->ContinueDIBits(handle, NULL)) {
+ while (m_pDevice->ContinueDIBits(handle, nullptr)) {
}
m_pDevice->CancelDIBits(handle);
- return handle != NULL;
+ return !!handle;
}
FX_BOOL CFDE_RenderDevice::DrawString(CFDE_Brush* pBrush,
IFGAS_Font* pFont,
@@ -126,9 +126,9 @@ FX_BOOL CFDE_RenderDevice::DrawString(CFDE_Brush* pBrush,
}
}
FXTEXT_CHARPOS* pCP = (FXTEXT_CHARPOS*)pCharPos;
- IFGAS_Font* pCurFont = NULL;
- IFGAS_Font* pSTFont = NULL;
- FXTEXT_CHARPOS* pCurCP = NULL;
+ IFGAS_Font* pCurFont = nullptr;
+ IFGAS_Font* pSTFont = nullptr;
+ FXTEXT_CHARPOS* pCurCP = nullptr;
int32_t iCurCount = 0;
#if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_
@@ -249,9 +249,9 @@ FX_BOOL CFDE_RenderDevice::DrawPath(CFDE_Pen* pPen,
const CFDE_Path* pPath,
const CFX_Matrix* pMatrix) {
CFDE_Path* pGePath = (CFDE_Path*)pPath;
- if (pGePath == NULL) {
+ if (!pGePath)
return FALSE;
- }
+
CFX_GraphStateData graphState;
if (!CreatePen(pPen, fPenWidth, graphState)) {
return FALSE;
« no previous file with comments | « xfa/fde/fde_gedevice.h ('k') | xfa/fde/fde_iterator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698