diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-04-16 09:13:02 -0700 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-04-16 09:13:02 -0700 |
commit | 3f754d483e257f0d373be28a64b58620b4e0953f (patch) | |
tree | 51dbd10bcfc25572ab5a6a70eba2eab0f6bf3131 /core/src/fxge/win32/fx_win32_print.cpp | |
parent | 026623249c78ba305c874cc093a035ef5a4cd1b4 (diff) | |
download | pdfium-3f754d483e257f0d373be28a64b58620b4e0953f.tar.xz |
Remove checks in fxge/{apple,win32,skia,dib} now that FX_NEW cant return 0
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1062863006
Diffstat (limited to 'core/src/fxge/win32/fx_win32_print.cpp')
-rw-r--r-- | core/src/fxge/win32/fx_win32_print.cpp | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/core/src/fxge/win32/fx_win32_print.cpp b/core/src/fxge/win32/fx_win32_print.cpp index 9e7a0aae95..7dc48a1808 100644 --- a/core/src/fxge/win32/fx_win32_print.cpp +++ b/core/src/fxge/win32/fx_win32_print.cpp @@ -143,13 +143,7 @@ static CFX_DIBitmap* Transform1bppBitmap(const CFX_DIBSource* pSrc, const CFX_Af CPDF_FixedMatrix result2src_fix(result2src, 8); int result_width = result_rect.Width(); int result_height = result_rect.Height(); - CFX_DIBitmap* pTempBitmap = FX_NEW CFX_DIBitmap; - if (!pTempBitmap) { - if (pSrcBitmap != src_bitmap) { - delete pSrcBitmap; - } - return NULL; - } + CFX_DIBitmap* pTempBitmap = new CFX_DIBitmap; if (!pTempBitmap->Create(result_width, result_height, pSrc->GetFormat())) { delete pTempBitmap; if (pSrcBitmap != src_bitmap) { @@ -291,10 +285,7 @@ FX_BOOL CPSPrinterDriver::Init(HDC hDC, int pslevel, FX_BOOL bCmykOutput) m_Width = ::GetDeviceCaps(m_hDC, HORZRES); m_Height = ::GetDeviceCaps(m_hDC, VERTRES); m_nBitsPerPixel = ::GetDeviceCaps(m_hDC, BITSPIXEL); - m_pPSOutput = FX_NEW CPSOutput(hDC); - if (!m_pPSOutput) { - return FALSE; - } + m_pPSOutput = new CPSOutput(hDC); ((CPSOutput*)m_pPSOutput)->Init(); m_PSRenderer.Init(m_pPSOutput, pslevel, m_Width, m_Height, bCmykOutput); m_bCmykOutput = bCmykOutput; |