Chromium Code Reviews| Index: core/src/fpdfapi/fpdf_font/ttgsubtable.h |
| diff --git a/core/src/fpdfapi/fpdf_font/ttgsubtable.h b/core/src/fpdfapi/fpdf_font/ttgsubtable.h |
| index b717c7af8b492359f445c0ce00b70dcea305dcb3..1f446599f0679193579399cf39ddedb42a36d372 100644 |
| --- a/core/src/fpdfapi/fpdf_font/ttgsubtable.h |
| +++ b/core/src/fpdfapi/fpdf_font/ttgsubtable.h |
| @@ -49,11 +49,7 @@ class CFX_CTTGSUBTable { |
| ReqFeatureIndex(0), |
| FeatureCount(0), |
| FeatureIndex(NULL) {} |
| - ~TLangSys() { |
| - if (FeatureIndex) { |
| - delete[] FeatureIndex; |
| - } |
| - } |
| + ~TLangSys() { delete[] FeatureIndex; } |
| private: |
| TLangSys(const TLangSys&); |
| @@ -73,11 +69,7 @@ class CFX_CTTGSUBTable { |
| TT_uint16_t LangSysCount; |
| struct TLangSysRecord* LangSysRecord; |
| TScript() : DefaultLangSys(0), LangSysCount(0), LangSysRecord(NULL) {} |
| - ~TScript() { |
| - if (LangSysRecord) { |
| - delete[] LangSysRecord; |
| - } |
| - } |
| + ~TScript() { delete[] LangSysRecord; } |
| private: |
| TScript(const TScript&); |
| @@ -96,11 +88,7 @@ class CFX_CTTGSUBTable { |
| TT_uint16_t ScriptCount; |
| struct TScriptRecord* ScriptRecord; |
| TScriptList() : ScriptCount(0), ScriptRecord(NULL) {} |
| - ~TScriptList() { |
| - if (ScriptRecord) { |
| - delete[] ScriptRecord; |
| - } |
| - } |
| + ~TScriptList() { delete[] ScriptRecord; } |
| private: |
| TScriptList(const TScriptList&); |
| @@ -112,9 +100,7 @@ class CFX_CTTGSUBTable { |
| TT_uint16_t* LookupListIndex; |
| TFeature() : FeatureParams(0), LookupCount(0), LookupListIndex(NULL) {} |
| ~TFeature() { |
| - if (LookupListIndex) { |
| delete[] LookupListIndex; |
|
Tom Sepez
2015/08/14 21:21:34
nit: indentation. Several other places. clang-fo
Lei Zhang
2015/08/14 21:43:14
I don't know why clang-format did all the ones abo
|
| - } |
| } |
| private: |
| @@ -135,9 +121,7 @@ class CFX_CTTGSUBTable { |
| struct TFeatureRecord* FeatureRecord; |
| TFeatureList() : FeatureCount(0), FeatureRecord(NULL) {} |
| ~TFeatureList() { |
| - if (FeatureRecord) { |
| delete[] FeatureRecord; |
| - } |
| } |
| private: |
| @@ -167,9 +151,7 @@ class CFX_CTTGSUBTable { |
| TT_uint16_t* GlyphArray; |
| TCoverageFormat1() : GlyphCount(0), GlyphArray(NULL) { CoverageFormat = 1; } |
| ~TCoverageFormat1() { |
| - if (GlyphArray) { |
| delete[] GlyphArray; |
| - } |
| } |
| private: |
| @@ -195,9 +177,7 @@ class CFX_CTTGSUBTable { |
| CoverageFormat = 2; |
| } |
| ~TCoverageFormat2() { |
| - if (RangeRecord) { |
| delete[] RangeRecord; |
| - } |
| } |
| private: |
| @@ -221,9 +201,7 @@ class CFX_CTTGSUBTable { |
| ClassFormat = 1; |
| } |
| ~TClassDefFormat1() { |
| - if (ClassValueArray) { |
| delete[] ClassValueArray; |
| - } |
| } |
| private: |
| @@ -247,9 +225,7 @@ class CFX_CTTGSUBTable { |
| ClassFormat = 2; |
| } |
| ~TClassDefFormat2() { |
| - if (ClassRangeRecord) { |
| delete[] ClassRangeRecord; |
| - } |
| } |
| private: |
| @@ -326,9 +302,7 @@ class CFX_CTTGSUBTable { |
| struct TLookup* Lookup; |
| TLookupList() : LookupCount(0), Lookup(NULL) {} |
| ~TLookupList() { |
| - if (Lookup) { |
| delete[] Lookup; |
| - } |
| } |
| private: |