summaryrefslogtreecommitdiff
path: root/core/src/fxcodec/codec/fx_codec_progress.h
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2016-02-22 20:32:21 -0800
committerLei Zhang <thestig@chromium.org>2016-02-22 20:32:21 -0800
commit5eca305b1586b2107566a5c124baa5f2e00096c0 (patch)
treed2b6b17b62995b2249a28956a17ae87122f83124 /core/src/fxcodec/codec/fx_codec_progress.h
parentd2019df0a77c5d01a336f16be054d2f373e38c54 (diff)
downloadpdfium-5eca305b1586b2107566a5c124baa5f2e00096c0.tar.xz
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 .
Diffstat (limited to 'core/src/fxcodec/codec/fx_codec_progress.h')
-rw-r--r--core/src/fxcodec/codec/fx_codec_progress.h18
1 files changed, 3 insertions, 15 deletions
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);