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

Side by Side Diff: core/src/fpdfapi/fpdf_font/fpdf_font_cid.cpp

Issue 1299963002: Extern in .cpp files is a code smell. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 5 years, 4 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
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 "../../../include/fpdfapi/fpdf_module.h" 7 #include "../../../include/fpdfapi/fpdf_module.h"
8 #include "../../../include/fpdfapi/fpdf_page.h" 8 #include "../../../include/fpdfapi/fpdf_page.h"
9 #include "../../../include/fpdfapi/fpdf_resource.h" 9 #include "../../../include/fpdfapi/fpdf_resource.h"
10 #include "../../../include/fxge/fx_freetype.h" 10 #include "../../../include/fxge/fx_freetype.h"
11 #include "../../../include/fxge/fx_ge.h" 11 #include "../../../include/fxge/fx_ge.h"
12 #include "../fpdf_cmaps/cmap_int.h" 12 #include "../fpdf_cmaps/cmap_int.h"
13 #include "font_int.h" 13 #include "font_int.h"
14 14
15 extern short TT2PDF(int m, FXFT_Face face);
16 extern FX_BOOL FT_UseTTCharmap(FXFT_Face face,
17 int platform_id,
18 int encoding_id);
19
20 CPDF_CMapManager::CPDF_CMapManager() { 15 CPDF_CMapManager::CPDF_CMapManager() {
21 m_bPrompted = FALSE; 16 m_bPrompted = FALSE;
22 FXSYS_memset(m_CID2UnicodeMaps, 0, sizeof m_CID2UnicodeMaps); 17 FXSYS_memset(m_CID2UnicodeMaps, 0, sizeof m_CID2UnicodeMaps);
23 } 18 }
24 CPDF_CMapManager::~CPDF_CMapManager() { 19 CPDF_CMapManager::~CPDF_CMapManager() {
25 for (const auto& pair : m_CMaps) { 20 for (const auto& pair : m_CMaps) {
26 delete pair.second; 21 delete pair.second;
27 } 22 }
28 m_CMaps.clear(); 23 m_CMaps.clear();
29 for (int i = 0; i < FX_ArraySize(m_CID2UnicodeMaps); ++i) { 24 for (int i = 0; i < FX_ArraySize(m_CID2UnicodeMaps); ++i) {
(...skipping 1609 matching lines...) Expand 10 before | Expand all | Expand 10 after
1639 if (middlecode > CID) { 1634 if (middlecode > CID) {
1640 end = middle - 1; 1635 end = middle - 1;
1641 } else if (middlecode < CID) { 1636 } else if (middlecode < CID) {
1642 begin = middle + 1; 1637 begin = middle + 1;
1643 } else { 1638 } else {
1644 return &Japan1_VertCIDs[middle].a; 1639 return &Japan1_VertCIDs[middle].a;
1645 } 1640 }
1646 } 1641 }
1647 return NULL; 1642 return NULL;
1648 } 1643 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698