diff options
author | dsinclair <dsinclair@chromium.org> | 2016-06-23 12:40:16 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-06-23 12:40:16 -0700 |
commit | 85d1f2c2f9f1e746bedb1b6f03576613f54fbc27 (patch) | |
tree | ff5b393fb9b89f006327bee7bc8c955522defb67 /xfa/fxfa/parser/xfa_localemgr.cpp | |
parent | 6e12478cb298c3a8277493ee79ae0b73d6df8554 (diff) | |
download | pdfium-85d1f2c2f9f1e746bedb1b6f03576613f54fbc27.tar.xz |
Remove NULL in xfa/
This CL converts all NULL's to nullptr. All instances of comparison to nullptr
have been removed.
Review-Url: https://codereview.chromium.org/2095653002
Diffstat (limited to 'xfa/fxfa/parser/xfa_localemgr.cpp')
-rw-r--r-- | xfa/fxfa/parser/xfa_localemgr.cpp | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/xfa/fxfa/parser/xfa_localemgr.cpp b/xfa/fxfa/parser/xfa_localemgr.cpp index 8911a41b96..570a719279 100644 --- a/xfa/fxfa/parser/xfa_localemgr.cpp +++ b/xfa/fxfa/parser/xfa_localemgr.cpp @@ -1033,19 +1033,19 @@ const uint8_t g_ruRU_Locale[] = { 0xB3, 0x85, 0xFA, 0x59, 0x2A, 0x7A, 0xFF, 0x3D, 0xC4, 0x3F, 0xDE, 0xCB, 0x8B, 0xC4}; static IFX_Locale* XFA_GetLocaleFromBuffer(const uint8_t* pBuf, int nBufLen) { - if (pBuf == NULL || nBufLen <= 0) { - return NULL; + if (!pBuf || nBufLen <= 0) { + return nullptr; } CFX_GEModule* pGeModule = CFX_GEModule::Get(); if (!pGeModule) { - return NULL; + return nullptr; } CCodec_ModuleMgr* pCodecMgr = pGeModule->GetCodecModule(); if (!pCodecMgr) { - return NULL; + return nullptr; } - CXML_Element* pLocale = NULL; - uint8_t* pOut = NULL; + CXML_Element* pLocale = nullptr; + uint8_t* pOut = nullptr; uint32_t dwSize; pCodecMgr->GetFlateModule()->FlateOrLZWDecode(FALSE, pBuf, nBufLen, TRUE, 0, 0, 0, 0, 0, pOut, dwSize); @@ -1056,7 +1056,7 @@ static IFX_Locale* XFA_GetLocaleFromBuffer(const uint8_t* pBuf, int nBufLen) { if (pLocale) { return new CXFA_XMLLocale(pLocale); } - return NULL; + return nullptr; } static uint16_t XFA_GetLanguage(CFX_WideString wsLanguage) { uint16_t dwLangueID = XFA_LANGID_en_US; @@ -1163,7 +1163,7 @@ IFX_Locale* CXFA_LocaleMgr::GetDefLocale() { } IFX_Locale* CXFA_LocaleMgr::GetLocale(uint16_t lcid) { - IFX_Locale* pLocal = NULL; + IFX_Locale* pLocal = nullptr; switch (lcid) { case XFA_LANGID_zh_CN: pLocal = XFA_GetLocaleFromBuffer(g_zhCN_Locale, sizeof(g_zhCN_Locale)); @@ -1226,7 +1226,7 @@ IFX_Locale* CXFA_LocaleMgr::GetLocaleByName( } int32_t iLen = wsLocaleName.GetLength(); if (iLen < 2) { - return NULL; + return nullptr; } iCount = m_XMLLocaleArray.GetSize(); for (i = 0; i < iCount; i++) { @@ -1256,9 +1256,10 @@ CFX_WideStringC CXFA_LocaleMgr::GetConfigLocaleName(CXFA_Node* pConfig) { CXFA_Node* pCommon = pChildfConfig ? pChildfConfig->GetFirstChildByClass(XFA_Element::Common) - : NULL; + : nullptr; CXFA_Node* pLocale = - pCommon ? pCommon->GetFirstChildByClass(XFA_Element::Locale) : NULL; + pCommon ? pCommon->GetFirstChildByClass(XFA_Element::Locale) + : nullptr; if (pLocale) { pLocale->TryCData(XFA_ATTRIBUTE_Value, m_wsConfigLocale, FALSE); } @@ -1267,7 +1268,7 @@ CFX_WideStringC CXFA_LocaleMgr::GetConfigLocaleName(CXFA_Node* pConfig) { } return m_wsConfigLocale.AsStringC(); } -static CXFA_TimeZoneProvider* g_pProvider = NULL; +static CXFA_TimeZoneProvider* g_pProvider = nullptr; // Static. CXFA_TimeZoneProvider* CXFA_TimeZoneProvider::Create() { @@ -1287,7 +1288,7 @@ CXFA_TimeZoneProvider* CXFA_TimeZoneProvider::Get() { // Static. void CXFA_TimeZoneProvider::Destroy() { delete g_pProvider; - g_pProvider = NULL; + g_pProvider = nullptr; } #include <time.h> |