From 5eca305b1586b2107566a5c124baa5f2e00096c0 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Mon, 22 Feb 2016 20:32:21 -0800 Subject: Remove foo != NULL outside of xfa/ Most of these are from the XFA branch. R=dsinclair@chromium.org Review URL: https://codereview.chromium.org/1720043003 . --- core/src/fxcodec/codec/fx_codec_progress.h | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) (limited to 'core/src/fxcodec/codec/fx_codec_progress.h') diff --git a/core/src/fxcodec/codec/fx_codec_progress.h b/core/src/fxcodec/codec/fx_codec_progress.h index 45fde21338..4fb13640ff 100644 --- a/core/src/fxcodec/codec/fx_codec_progress.h +++ b/core/src/fxcodec/codec/fx_codec_progress.h @@ -21,11 +21,7 @@ struct PixelWeight { class CFXCODEC_WeightTable { public: CFXCODEC_WeightTable() { m_pWeightTables = NULL; } - ~CFXCODEC_WeightTable() { - if (m_pWeightTables != NULL) { - FX_Free(m_pWeightTables); - } - } + ~CFXCODEC_WeightTable() { FX_Free(m_pWeightTables); } void Calc(int dest_len, int dest_min, @@ -44,11 +40,7 @@ class CFXCODEC_WeightTable { class CFXCODEC_HorzTable { public: CFXCODEC_HorzTable() { m_pWeightTables = NULL; } - ~CFXCODEC_HorzTable() { - if (m_pWeightTables != NULL) { - FX_Free(m_pWeightTables); - } - } + ~CFXCODEC_HorzTable() { FX_Free(m_pWeightTables); } void Calc(int dest_len, int src_len, FX_BOOL bInterpol); PixelWeight* GetPixelWeight(int pixel) { @@ -61,11 +53,7 @@ class CFXCODEC_HorzTable { class CFXCODEC_VertTable { public: CFXCODEC_VertTable() { m_pWeightTables = NULL; } - ~CFXCODEC_VertTable() { - if (m_pWeightTables != NULL) { - FX_Free(m_pWeightTables); - } - } + ~CFXCODEC_VertTable() { FX_Free(m_pWeightTables); } void Calc(int dest_len, int src_len); PixelWeight* GetPixelWeight(int pixel) { return (PixelWeight*)(m_pWeightTables + pixel * m_ItemSize); -- cgit v1.2.3