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

Unified Diff: xfa/fwl/theme/cfwl_widgettp.cpp

Issue 2031873003: Get rid of NULLs in xfa/ (Closed) Base URL: https://pdfium.googlesource.com/pdfium@nullptr_fpdfsdk
Patch Set: Created 4 years, 6 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 | « xfa/fwl/theme/cfwl_widgettp.h ('k') | xfa/fxbarcode/BC_BinaryBitmap.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fwl/theme/cfwl_widgettp.cpp
diff --git a/xfa/fwl/theme/cfwl_widgettp.cpp b/xfa/fwl/theme/cfwl_widgettp.cpp
index 1b437ebe9bc4315713c9bbf7fadc1641c2f195b2..3704f87a300b74268e4d86b176bdf5afb95d8fec 100644
--- a/xfa/fwl/theme/cfwl_widgettp.cpp
+++ b/xfa/fwl/theme/cfwl_widgettp.cpp
@@ -149,7 +149,7 @@ void* CFWL_WidgetTP::GetCapacity(CFWL_ThemePart* pThemePart,
m_rtMargin.Set(0, 0, 0, 0);
return &m_rtMargin;
}
- default: { return NULL; }
+ default: { return nullptr; }
}
return &m_fValue;
}
@@ -664,17 +664,17 @@ void CFWL_WidgetTP::DrawArrowBtn(CFX_Graphics* pGraphics,
CFWL_ArrowData::GetInstance()->m_pColorData;
DrawArrow(pGraphics, pRect, eDict, pColorData->clrSign[eState - 1], pMatrix);
}
-CFWL_ArrowData::CFWL_ArrowData() : m_pColorData(NULL) {
+CFWL_ArrowData::CFWL_ArrowData() : m_pColorData(nullptr) {
SetColorData(0);
}
CFWL_FontData::CFWL_FontData()
: m_dwStyles(0),
m_dwCodePage(0),
m_pFont(0),
- m_pFontMgr(NULL)
+ m_pFontMgr(nullptr)
#if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_
,
- m_pFontSource(NULL)
+ m_pFontSource(nullptr)
#endif
{
}
@@ -686,9 +686,8 @@ CFWL_FontData::~CFWL_FontData() {
m_pFontMgr->Release();
}
#if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_
- if (m_pFontSource != NULL) {
+ if (m_pFontSource)
m_pFontSource->Release();
- }
#endif
}
FX_BOOL CFWL_FontData::Equal(const CFX_WideStringC& wsFontFamily,
@@ -713,7 +712,7 @@ FX_BOOL CFWL_FontData::LoadFont(const CFX_WideStringC& wsFontFamily,
}
m_pFont = IFGAS_Font::LoadFont(wsFontFamily.c_str(), dwFontStyles, dwCodePage,
m_pFontMgr);
- return m_pFont != NULL;
+ return !!m_pFont;
}
CFWL_FontManager* CFWL_FontManager::s_FontManager = nullptr;
@@ -755,7 +754,7 @@ uint32_t FWL_GetThemeColor(uint32_t dwThemeID) {
return 0x0000ffff & dwThemeID;
}
-CFWL_ArrowData* CFWL_ArrowData::m_pInstance = NULL;
+CFWL_ArrowData* CFWL_ArrowData::m_pInstance = nullptr;
CFWL_ArrowData* CFWL_ArrowData::GetInstance() {
if (!m_pInstance)
« no previous file with comments | « xfa/fwl/theme/cfwl_widgettp.h ('k') | xfa/fxbarcode/BC_BinaryBitmap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698