Remove CFGAS_FontMgr::RemoveFont().
It is never called.
Change-Id: I95bcfe260099502ca5388cfd78cb6b49ffa84163
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/73331
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
diff --git a/xfa/fgas/font/cfgas_fontmgr.cpp b/xfa/fgas/font/cfgas_fontmgr.cpp
index cacb962..9153e8a 100644
--- a/xfa/fgas/font/cfgas_fontmgr.cpp
+++ b/xfa/fgas/font/cfgas_fontmgr.cpp
@@ -886,26 +886,3 @@
return GetFontByCodePage(wCodePage, dwFontStyles, pszFontFamily);
#endif // defined(OS_WIN)
}
-
-void CFGAS_FontMgr::RemoveFont(const RetainPtr<CFGAS_GEFont>& pEFont) {
- if (!pEFont)
- return;
-
-#if !defined(OS_WIN)
- m_IFXFont2FileRead.erase(pEFont);
-#endif
-
- auto iter = m_Hash2Fonts.begin();
- while (iter != m_Hash2Fonts.end()) {
- auto old_iter = iter++;
- bool all_empty = true;
- for (size_t i = 0; i < old_iter->second.size(); i++) {
- if (old_iter->second[i] == pEFont)
- old_iter->second[i].Reset();
- else if (old_iter->second[i])
- all_empty = false;
- }
- if (all_empty)
- m_Hash2Fonts.erase(old_iter);
- }
-}
diff --git a/xfa/fgas/font/cfgas_fontmgr.h b/xfa/fgas/font/cfgas_fontmgr.h
index 6c7df2c..94def1c 100644
--- a/xfa/fgas/font/cfgas_fontmgr.h
+++ b/xfa/fgas/font/cfgas_fontmgr.h
@@ -110,8 +110,6 @@
RetainPtr<CFGAS_GEFont> LoadFont(const wchar_t* pszFontFamily,
uint32_t dwFontStyles,
uint16_t wCodePage);
- void RemoveFont(const RetainPtr<CFGAS_GEFont>& pFont);
-
bool EnumFonts();
private: