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

Unified Diff: core/src/fxcodec/codec/fx_codec_progress.h

Issue 1720043003: Remove foo != NULL outside of xfa/ (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: rebase Created 4 years, 10 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/fxcodec/codec/fx_codec_png.cpp ('k') | core/src/fxcodec/codec/fx_codec_progress.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: 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 45fde21338b122a99fe2ec2a8029ab1609147e78..4fb13640ff6bea7f2e2ffd63a096b65c6cebf980 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);
« no previous file with comments | « core/src/fxcodec/codec/fx_codec_png.cpp ('k') | core/src/fxcodec/codec/fx_codec_progress.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698