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

Unified Diff: core/src/fxge/win32/fx_win32_device.cpp

Issue 369343003: Remove uninitialized const global g_GbFontNameMap. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 6 years, 5 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fxge/win32/fx_win32_device.cpp
diff --git a/core/src/fxge/win32/fx_win32_device.cpp b/core/src/fxge/win32/fx_win32_device.cpp
index 2e2ea9a92b32635d53e24a3d94f1659f1882dabf..1637a665e86344342a44f83bcef5f586fcf1c251 100644
--- a/core/src/fxge/win32/fx_win32_device.cpp
+++ b/core/src/fxge/win32/fx_win32_device.cpp
@@ -204,23 +204,16 @@ const _FontNameMap g_JpFontNameMap[] = {
{"MS Mincho", "Heiseimin-W3"},
{"MS Gothic", "Jun101-Light"},
};
-const _FontNameMap g_GbFontNameMap[1];
extern "C" {
static int compareString(const void* key, const void* element)
{
return FXSYS_stricmp((FX_LPCSTR)key, ((_FontNameMap*)element)->m_pSrcFontName);
}
}
-FX_BOOL _GetSubFontName(CFX_ByteString& name, int lang)
+FX_BOOL _GetSubFontName(CFX_ByteString& name)
{
int size = sizeof g_JpFontNameMap;
void* pFontnameMap = (void*)g_JpFontNameMap;
- if (lang == 1) {
- size = sizeof g_GbFontNameMap;
- pFontnameMap = (void*)g_GbFontNameMap;
- } else if (lang == 2) {
- size = 0;
- }
_FontNameMap* found = (_FontNameMap*)FXSYS_bsearch((FX_LPCSTR)name, pFontnameMap,
size / sizeof (_FontNameMap), sizeof (_FontNameMap), compareString);
if (found == NULL) {
@@ -280,7 +273,7 @@ void CWin32FontInfo::GetJapanesePreference(CFX_ByteString& face, int weight, int
}
return;
}
- if (_GetSubFontName(face, 0)) {
+ if (_GetSubFontName(face)) {
return;
}
if (!(picth_family & FF_ROMAN) && weight > 400) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698