From 97b4b48685b7624cc69f73f9c57bb9e23159c8ec Mon Sep 17 00:00:00 2001 From: Nicolas Pena Date: Wed, 29 Nov 2017 16:05:10 +0000 Subject: Remove unneded structs from CFX_CTTGSUBTable part 1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This CL removes some useless structs from CFX_CTTGSUBTable. Change-Id: Iaf8b58d70b36d77fea73946c6b4279b15f5726e8 Reviewed-on: https://pdfium-review.googlesource.com/19710 Reviewed-by: dsinclair Commit-Queue: Nicolás Peña Moreno --- core/fpdfapi/font/cfx_cttgsubtable.h | 57 +++++------------------------------- 1 file changed, 7 insertions(+), 50 deletions(-) (limited to 'core/fpdfapi/font/cfx_cttgsubtable.h') diff --git a/core/fpdfapi/font/cfx_cttgsubtable.h b/core/fpdfapi/font/cfx_cttgsubtable.h index f8fd6c5c5e..fc8d125f3e 100644 --- a/core/fpdfapi/font/cfx_cttgsubtable.h +++ b/core/fpdfapi/font/cfx_cttgsubtable.h @@ -19,21 +19,12 @@ class CFX_CTTGSUBTable { public: CFX_CTTGSUBTable(); - explicit CFX_CTTGSUBTable(FT_Bytes gsub); - virtual ~CFX_CTTGSUBTable(); + ~CFX_CTTGSUBTable(); - bool IsOk() const; bool LoadGSUBTable(FT_Bytes gsub); bool GetVerticalGlyph(uint32_t glyphnum, uint32_t* vglyphnum); private: - struct tt_gsub_header { - uint32_t Version; - uint16_t ScriptList; - uint16_t FeatureList; - uint16_t LookupList; - }; - struct TLangSys { TLangSys(); ~TLangSys(); @@ -81,17 +72,6 @@ class CFX_CTTGSUBTable { TScriptRecord& operator=(const TScriptRecord&) = delete; }; - struct TScriptList { - TScriptList(); - ~TScriptList(); - - std::vector ScriptRecords; - - private: - TScriptList(const TScriptList&) = delete; - TScriptList& operator=(const TScriptList&) = delete; - }; - struct TFeature { TFeature(); ~TFeature(); @@ -115,17 +95,6 @@ class CFX_CTTGSUBTable { TFeatureRecord& operator=(const TFeatureRecord&) = delete; }; - struct TFeatureList { - TFeatureList(); - ~TFeatureList(); - - std::vector FeatureRecords; - - private: - TFeatureList(const TFeatureList&) = delete; - TFeatureList& operator=(const TFeatureList&) = delete; - }; - enum TLookupFlag { LOOKUPFLAG_RightToLeft = 0x0001, LOOKUPFLAG_IgnoreBaseGlyphs = 0x0002, @@ -245,24 +214,13 @@ class CFX_CTTGSUBTable { TLookup& operator=(const TLookup&) = delete; }; - struct TLookupList { - TLookupList(); - ~TLookupList(); - - std::vector Lookups; - - private: - TLookupList(const TLookupList&) = delete; - TLookupList& operator=(const TLookupList&) = delete; - }; - bool Parse(FT_Bytes scriptlist, FT_Bytes featurelist, FT_Bytes lookuplist); - void ParseScriptList(FT_Bytes raw, TScriptList* rec); + void ParseScriptList(FT_Bytes raw); void ParseScript(FT_Bytes raw, TScript* rec); void ParseLangSys(FT_Bytes raw, TLangSys* rec); - void ParseFeatureList(FT_Bytes raw, TFeatureList* rec); + void ParseFeatureList(FT_Bytes raw); void ParseFeature(FT_Bytes raw, TFeature* rec); - void ParseLookupList(FT_Bytes raw, TLookupList* rec); + void ParseLookupList(FT_Bytes raw); void ParseLookup(FT_Bytes raw, TLookup* rec); std::unique_ptr ParseCoverage(FT_Bytes raw); void ParseCoverageFormat1(FT_Bytes raw, TCoverageFormat1* rec); @@ -288,10 +246,9 @@ class CFX_CTTGSUBTable { std::set m_featureSet; bool m_bFeautureMapLoad; bool loaded; - tt_gsub_header header; - TScriptList ScriptList; - TFeatureList FeatureList; - TLookupList LookupList; + std::vector ScriptList; + std::vector FeatureList; + std::vector LookupList; }; #endif // CORE_FPDFAPI_FONT_CFX_CTTGSUBTABLE_H_ -- cgit v1.2.3