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

Side by Side Diff: core/fpdfapi/fpdf_font/ttgsubtable.cpp

Issue 2084603003: Change func(void) to func() (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: style fix Created 4 years, 6 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 unified diff | Download patch
« no previous file with comments | « core/fpdfapi/fpdf_font/ttgsubtable.h ('k') | core/fxcrt/include/fx_system.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "core/fpdfapi/fpdf_font/ttgsubtable.h" 7 #include "core/fpdfapi/fpdf_font/ttgsubtable.h"
8 8
9 #include <memory> 9 #include <memory>
10 10
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 void* pResult = FXSYS_bsearch(&key, m_Buffer.GetBuffer(), 54 void* pResult = FXSYS_bsearch(&key, m_Buffer.GetBuffer(),
55 m_Buffer.GetSize() / sizeof(_IntPair), 55 m_Buffer.GetSize() / sizeof(_IntPair),
56 sizeof(_IntPair), _CompareInt); 56 sizeof(_IntPair), _CompareInt);
57 if (!pResult) { 57 if (!pResult) {
58 return FALSE; 58 return FALSE;
59 } 59 }
60 value = ((uint32_t*)pResult)[1]; 60 value = ((uint32_t*)pResult)[1];
61 return TRUE; 61 return TRUE;
62 } 62 }
63 63
64 CFX_CTTGSUBTable::CFX_CTTGSUBTable(void) 64 CFX_CTTGSUBTable::CFX_CTTGSUBTable()
65 : m_bFeautureMapLoad(FALSE), loaded(false) {} 65 : m_bFeautureMapLoad(FALSE), loaded(false) {}
66 66
67 CFX_CTTGSUBTable::CFX_CTTGSUBTable(FT_Bytes gsub) 67 CFX_CTTGSUBTable::CFX_CTTGSUBTable(FT_Bytes gsub)
68 : m_bFeautureMapLoad(FALSE), loaded(false) { 68 : m_bFeautureMapLoad(FALSE), loaded(false) {
69 LoadGSUBTable(gsub); 69 LoadGSUBTable(gsub);
70 } 70 }
71 71
72 CFX_CTTGSUBTable::~CFX_CTTGSUBTable() {} 72 CFX_CTTGSUBTable::~CFX_CTTGSUBTable() {}
73 73
74 bool CFX_CTTGSUBTable::IsOk(void) const { 74 bool CFX_CTTGSUBTable::IsOk() const {
75 return loaded; 75 return loaded;
76 } 76 }
77 77
78 bool CFX_CTTGSUBTable::LoadGSUBTable(FT_Bytes gsub) { 78 bool CFX_CTTGSUBTable::LoadGSUBTable(FT_Bytes gsub) {
79 header.Version = gsub[0] << 24 | gsub[1] << 16 | gsub[2] << 8 | gsub[3]; 79 header.Version = gsub[0] << 24 | gsub[1] << 16 | gsub[2] << 8 | gsub[3];
80 if (header.Version != 0x00010000) { 80 if (header.Version != 0x00010000) {
81 return false; 81 return false;
82 } 82 }
83 header.ScriptList = gsub[4] << 8 | gsub[5]; 83 header.ScriptList = gsub[4] << 8 | gsub[5];
84 header.FeatureList = gsub[6] << 8 | gsub[7]; 84 header.FeatureList = gsub[6] << 8 | gsub[7];
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 CFX_CTTGSUBTable::TLookup::TLookup() 512 CFX_CTTGSUBTable::TLookup::TLookup()
513 : LookupType(0), LookupFlag(0), SubTableCount(0), SubTable(nullptr) {} 513 : LookupType(0), LookupFlag(0), SubTableCount(0), SubTable(nullptr) {}
514 514
515 CFX_CTTGSUBTable::TLookup::~TLookup() { 515 CFX_CTTGSUBTable::TLookup::~TLookup() {
516 if (SubTable) { 516 if (SubTable) {
517 for (int i = 0; i < SubTableCount; ++i) 517 for (int i = 0; i < SubTableCount; ++i)
518 delete SubTable[i]; 518 delete SubTable[i];
519 delete[] SubTable; 519 delete[] SubTable;
520 } 520 }
521 } 521 }
OLDNEW
« no previous file with comments | « core/fpdfapi/fpdf_font/ttgsubtable.h ('k') | core/fxcrt/include/fx_system.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698