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

Unified Diff: core/src/fxge/ge/fx_ge_fontmap.cpp

Issue 1277883004: Add CFX_FontFaceInfo constructor. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Put consts together 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | core/src/fxge/ge/fx_ge_linux.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fxge/ge/fx_ge_fontmap.cpp
diff --git a/core/src/fxge/ge/fx_ge_fontmap.cpp b/core/src/fxge/ge/fx_ge_fontmap.cpp
index cd2195829f7b42c529cb560dad7343f053c608db..02af775a31f9921ca08e9d5c98540805ec897168 100644
--- a/core/src/fxge/ge/fx_ge_fontmap.cpp
+++ b/core/src/fxge/ge/fx_ge_fontmap.cpp
@@ -453,12 +453,13 @@ FX_BOOL CFX_FontMgr::GetStandardFont(const uint8_t*& pFontData,
return TRUE;
}
CFX_FontMapper::CFX_FontMapper(CFX_FontMgr* mgr)
- : m_pFontInfo(nullptr),
- m_bListLoaded(FALSE),
+ : m_bListLoaded(FALSE),
+ m_pFontInfo(nullptr),
Nico 2015/08/06 20:23:27 This breaks the clang/win build: ..\..\third_part
m_pFontEnumerator(nullptr),
m_pFontMgr(mgr) {
- FXSYS_memset(m_FoxitFaces, 0, sizeof m_FoxitFaces);
- m_MMFaces[0] = m_MMFaces[1] = NULL;
+ m_MMFaces[0] = nullptr;
+ m_MMFaces[1] = nullptr;
+ FXSYS_memset(m_FoxitFaces, 0, sizeof(m_FoxitFaces));
}
CFX_FontMapper::~CFX_FontMapper() {
for (int i = 0; i < 14; i++)
@@ -1280,7 +1281,7 @@ CFX_FolderFontInfo::~CFX_FolderFontInfo() {
CFX_ByteString key;
void* value;
m_FontList.GetNextAssoc(pos, key, value);
- delete (CFontFaceInfo*)value;
+ delete (CFX_FontFaceInfo*)value;
}
}
void CFX_FolderFontInfo::AddPath(const CFX_ByteStringC& path) {
@@ -1394,13 +1395,8 @@ void CFX_FolderFontInfo::ReportFace(CFX_ByteString& path,
if (m_FontList.Lookup(facename, p)) {
return;
}
- CFontFaceInfo* pInfo = new CFontFaceInfo;
- pInfo->m_FilePath = path;
- pInfo->m_FaceName = facename;
- pInfo->m_FontTables = tables;
- pInfo->m_FontOffset = offset;
- pInfo->m_FileSize = filesize;
- pInfo->m_Charsets = 0;
+ CFX_FontFaceInfo* pInfo =
+ new CFX_FontFaceInfo(path, facename, tables, offset, filesize);
CFX_ByteString os2 =
_FPDF_LoadTableFromTT(pFile, tables, nTables, 0x4f532f32);
if (os2.GetLength() >= 86) {
@@ -1464,7 +1460,7 @@ FX_DWORD CFX_FolderFontInfo::GetFontData(void* hFont,
if (hFont == NULL) {
return 0;
}
- CFontFaceInfo* pFont = (CFontFaceInfo*)hFont;
+ CFX_FontFaceInfo* pFont = (CFX_FontFaceInfo*)hFont;
FXSYS_FILE* pFile = NULL;
if (size > 0) {
pFile = FXSYS_fopen(pFont->m_FilePath, "rb");
@@ -1504,7 +1500,7 @@ FX_BOOL CFX_FolderFontInfo::GetFaceName(void* hFont, CFX_ByteString& name) {
if (hFont == NULL) {
return FALSE;
}
- CFontFaceInfo* pFont = (CFontFaceInfo*)hFont;
+ CFX_FontFaceInfo* pFont = (CFX_FontFaceInfo*)hFont;
name = pFont->m_FaceName;
return TRUE;
}
« no previous file with comments | « no previous file | core/src/fxge/ge/fx_ge_linux.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698