diff options
author | thestig <thestig@chromium.org> | 2016-06-10 12:21:53 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-06-10 12:21:53 -0700 |
commit | cfb77ccb1c057d6beb73f0043e42eee8c4822f84 (patch) | |
tree | c71d7097de50879080a237f47b42e22e1d6784db /xfa/fde/fde_gedevice.cpp | |
parent | 7f3a15f714c8311b1adb7bdce1ac83c7113af598 (diff) | |
download | pdfium-cfb77ccb1c057d6beb73f0043e42eee8c4822f84.tar.xz |
Get rid of NULLs in xfa/fde/
Review-Url: https://codereview.chromium.org/2039923004
Diffstat (limited to 'xfa/fde/fde_gedevice.cpp')
-rw-r--r-- | xfa/fde/fde_gedevice.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/xfa/fde/fde_gedevice.cpp b/xfa/fde/fde_gedevice.cpp index 03065d751c..c7c5cfb970 100644 --- a/xfa/fde/fde_gedevice.cpp +++ b/xfa/fde/fde_gedevice.cpp @@ -60,7 +60,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; @@ -73,7 +73,6 @@ FX_BOOL CFDE_RenderDevice::DrawImage(CFX_DIBSource* pDib, const CFX_RectF& dstRect, const CFX_Matrix* pImgMatrix, const CFX_Matrix* pDevMatrix) { - ASSERT(pDib != NULL); CFX_RectF srcRect; if (pSrcRect) { srcRect = *pSrcRect; @@ -96,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, CFGAS_GEFont* pFont, @@ -250,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; |