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

Unified Diff: core/src/fxge/dib/fx_dib_composite.cpp

Issue 1297713003: Don't bother checking pointers before delete[] and FX_Free(). (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: rebase Created 5 years, 4 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/src/fxge/dib/dib_int.h ('k') | core/src/fxge/dib/fx_dib_convert.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fxge/dib/fx_dib_composite.cpp
diff --git a/core/src/fxge/dib/fx_dib_composite.cpp b/core/src/fxge/dib/fx_dib_composite.cpp
index 84062d80b14424672518680c6df9695d509e9b3e..89a52f3dba5ed7c6fab60e443195adc8aceb2c3b 100644
--- a/core/src/fxge/dib/fx_dib_composite.cpp
+++ b/core/src/fxge/dib/fx_dib_composite.cpp
@@ -4193,12 +4193,8 @@ CFX_ScanlineCompositor::CFX_ScanlineCompositor() {
m_BlendType = FXDIB_BLEND_NORMAL;
}
CFX_ScanlineCompositor::~CFX_ScanlineCompositor() {
- if (m_pSrcPalette) {
- FX_Free(m_pSrcPalette);
- }
- if (m_pCacheScanline) {
- FX_Free(m_pCacheScanline);
- }
+ FX_Free(m_pSrcPalette);
+ FX_Free(m_pCacheScanline);
}
FX_BOOL CFX_ScanlineCompositor::Init(FXDIB_Format dest_format,
FXDIB_Format src_format,
@@ -5010,18 +5006,10 @@ CFX_BitmapComposer::CFX_BitmapComposer() {
m_BlendType = FXDIB_BLEND_NORMAL;
}
CFX_BitmapComposer::~CFX_BitmapComposer() {
- if (m_pScanlineV) {
- FX_Free(m_pScanlineV);
- }
- if (m_pScanlineAlphaV) {
- FX_Free(m_pScanlineAlphaV);
- }
- if (m_pClipScanV) {
- FX_Free(m_pClipScanV);
- }
- if (m_pAddClipScan) {
- FX_Free(m_pAddClipScan);
- }
+ FX_Free(m_pScanlineV);
+ FX_Free(m_pScanlineAlphaV);
+ FX_Free(m_pClipScanV);
+ FX_Free(m_pAddClipScan);
}
void CFX_BitmapComposer::Compose(CFX_DIBitmap* pDest,
const CFX_ClipRgn* pClipRgn,
« no previous file with comments | « core/src/fxge/dib/dib_int.h ('k') | core/src/fxge/dib/fx_dib_convert.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698