Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 | 6 |
| 7 #ifndef CORE_SRC_FPDFAPI_FPDF_FONT_TTGSUBTABLE_H_ | 7 #ifndef CORE_SRC_FPDFAPI_FPDF_FONT_TTGSUBTABLE_H_ |
| 8 #define CORE_SRC_FPDFAPI_FPDF_FONT_TTGSUBTABLE_H_ | 8 #define CORE_SRC_FPDFAPI_FPDF_FONT_TTGSUBTABLE_H_ |
| 9 | 9 |
| 10 #include <stdint.h> | 10 #include <stdint.h> |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 270 TSingleSubstFormat2& operator=(const TSingleSubstFormat2&); | 270 TSingleSubstFormat2& operator=(const TSingleSubstFormat2&); |
| 271 }; | 271 }; |
| 272 struct TLookup { | 272 struct TLookup { |
| 273 uint16_t LookupType; | 273 uint16_t LookupType; |
| 274 uint16_t LookupFlag; | 274 uint16_t LookupFlag; |
| 275 uint16_t SubTableCount; | 275 uint16_t SubTableCount; |
| 276 struct TSubTableBase** SubTable; | 276 struct TSubTableBase** SubTable; |
| 277 TLookup() | 277 TLookup() |
| 278 : LookupType(0), LookupFlag(0), SubTableCount(0), SubTable(NULL) {} | 278 : LookupType(0), LookupFlag(0), SubTableCount(0), SubTable(NULL) {} |
| 279 ~TLookup() { | 279 ~TLookup() { |
| 280 if (SubTableCount > 0 && SubTable != NULL) { | 280 if (SubTableCount > 0 && SubTable) { |
|
Tom Sepez
2015/12/14 19:14:07
nit: could we write
if (SubTable && SubTableCo
Lei Zhang
2015/12/15 01:38:32
Done.
| |
| 281 for (int i = 0; i < SubTableCount; i++) { | 281 for (int i = 0; i < SubTableCount; i++) { |
| 282 delete SubTable[i]; | 282 delete SubTable[i]; |
| 283 } | 283 } |
| 284 delete[] SubTable; | 284 delete[] SubTable; |
| 285 } | 285 } |
| 286 } | 286 } |
| 287 | 287 |
| 288 private: | 288 private: |
| 289 TLookup(const TLookup&); | 289 TLookup(const TLookup&); |
| 290 TLookup& operator=(const TLookup&); | 290 TLookup& operator=(const TLookup&); |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 355 }; | 355 }; |
| 356 class CFX_GSUBTable final : public IFX_GSUBTable { | 356 class CFX_GSUBTable final : public IFX_GSUBTable { |
| 357 public: | 357 public: |
| 358 ~CFX_GSUBTable() override {} | 358 ~CFX_GSUBTable() override {} |
| 359 FX_BOOL GetVerticalGlyph(FX_DWORD glyphnum, FX_DWORD* vglyphnum) override; | 359 FX_BOOL GetVerticalGlyph(FX_DWORD glyphnum, FX_DWORD* vglyphnum) override; |
| 360 | 360 |
| 361 CFX_CTTGSUBTable m_GsubImp; | 361 CFX_CTTGSUBTable m_GsubImp; |
| 362 }; | 362 }; |
| 363 | 363 |
| 364 #endif // CORE_SRC_FPDFAPI_FPDF_FONT_TTGSUBTABLE_H_ | 364 #endif // CORE_SRC_FPDFAPI_FPDF_FONT_TTGSUBTABLE_H_ |
| OLD | NEW |