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

Side by Side Diff: core/src/fpdfapi/fpdf_font/ttgsubtable.h

Issue 1512763013: Get rid of most instance of 'foo != NULL' (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: rebase Created 5 years 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 unified diff | Download patch
OLDNEW
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
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
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698