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

Unified Diff: fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp

Issue 1720043003: Remove foo != NULL outside of xfa/ (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: rebase Created 4 years, 10 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 | « core/src/fxcrt/fx_basic_maps.cpp ('k') | fpdfsdk/src/formfiller/FFL_CheckBox.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp
diff --git a/fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp b/fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp
index 96f727eee60fca1f8f4c0de2920a8ce08c5e33c7..bba44ab63969bfd6bfd7f90c82c11fa875bb11a5 100644
--- a/fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp
+++ b/fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp
@@ -59,7 +59,7 @@ void CBA_FontMap::Initialize() {
void CBA_FontMap::SetDefaultFont(CPDF_Font* pFont,
const CFX_ByteString& sFontName) {
- ASSERT(pFont != NULL);
+ ASSERT(pFont);
if (m_pDefaultFont)
return;
@@ -75,12 +75,8 @@ void CBA_FontMap::SetDefaultFont(CPDF_Font* pFont,
CPDF_Font* CBA_FontMap::FindFontSameCharset(CFX_ByteString& sFontAlias,
int32_t nCharset) {
- ASSERT(m_pAnnotDict != NULL);
-
if (m_pAnnotDict->GetStringBy("Subtype") == "Widget") {
CPDF_Document* pDocument = GetDocument();
- ASSERT(pDocument != NULL);
-
CPDF_Dictionary* pRootDict = pDocument->GetRoot();
if (!pRootDict)
return NULL;
@@ -109,15 +105,12 @@ CPDF_Font* CBA_FontMap::FindResFontSameCharset(CPDF_Dictionary* pResDict,
if (!pResDict)
return NULL;
- CPDF_Document* pDocument = GetDocument();
- ASSERT(pDocument != NULL);
-
CPDF_Dictionary* pFonts = pResDict->GetDictBy("Font");
if (!pFonts)
return NULL;
+ CPDF_Document* pDocument = GetDocument();
CPDF_Font* pFind = NULL;
-
for (const auto& it : *pFonts) {
const CFX_ByteString& csKey = it.first;
CPDF_Object* pObj = it.second;
@@ -154,9 +147,6 @@ void CBA_FontMap::AddFontToAnnotDict(CPDF_Font* pFont,
if (!pFont)
return;
- ASSERT(m_pAnnotDict != NULL);
- ASSERT(m_pDocument != NULL);
-
CPDF_Dictionary* pAPDict = m_pAnnotDict->GetDictBy("AP");
if (!pAPDict) {
@@ -205,9 +195,6 @@ void CBA_FontMap::AddFontToAnnotDict(CPDF_Font* pFont,
}
CPDF_Font* CBA_FontMap::GetAnnotDefaultFont(CFX_ByteString& sAlias) {
- ASSERT(m_pAnnotDict != NULL);
- ASSERT(m_pDocument != NULL);
-
CPDF_Dictionary* pAcroFormDict = NULL;
FX_BOOL bWidget = (m_pAnnotDict->GetStringBy("Subtype") == "Widget");
« no previous file with comments | « core/src/fxcrt/fx_basic_maps.cpp ('k') | fpdfsdk/src/formfiller/FFL_CheckBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698