diff options
author | thestig <thestig@chromium.org> | 2016-06-07 10:46:22 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-06-07 10:46:23 -0700 |
commit | 4997b22f84307521a62838f874928bf56cd3423c (patch) | |
tree | ad11d99ac0a491ee222e9d0a42ec3b6ad3354e2a /core/fpdfapi/fpdf_cmaps | |
parent | 0687e76dc259c678b3f29a6608331f07ffd8f1e2 (diff) | |
download | pdfium-4997b22f84307521a62838f874928bf56cd3423c.tar.xz |
Get rid of NULLs in core/
Review-Url: https://codereview.chromium.org/2032613003
Diffstat (limited to 'core/fpdfapi/fpdf_cmaps')
-rw-r--r-- | core/fpdfapi/fpdf_cmaps/CNS1/cmaps_cns1.cpp | 24 | ||||
-rw-r--r-- | core/fpdfapi/fpdf_cmaps/GB1/cmaps_gb1.cpp | 26 | ||||
-rw-r--r-- | core/fpdfapi/fpdf_cmaps/Japan1/cmaps_japan1.cpp | 44 | ||||
-rw-r--r-- | core/fpdfapi/fpdf_cmaps/Korea1/cmaps_korea1.cpp | 22 | ||||
-rw-r--r-- | core/fpdfapi/fpdf_cmaps/fpdf_cmaps.cpp | 2 |
5 files changed, 60 insertions, 58 deletions
diff --git a/core/fpdfapi/fpdf_cmaps/CNS1/cmaps_cns1.cpp b/core/fpdfapi/fpdf_cmaps/CNS1/cmaps_cns1.cpp index 119c42b5c1..2da1197787 100644 --- a/core/fpdfapi/fpdf_cmaps/CNS1/cmaps_cns1.cpp +++ b/core/fpdfapi/fpdf_cmaps/CNS1/cmaps_cns1.cpp @@ -14,33 +14,33 @@ static const FXCMAP_CMap g_FXCMAP_CNS1_cmaps[] = { {"B5pc-H", FXCMAP_CMap::Range, g_FXCMAP_B5pc_H_0, 247, FXCMAP_CMap::None, - NULL, 0, 0}, + nullptr, 0, 0}, {"B5pc-V", FXCMAP_CMap::Range, g_FXCMAP_B5pc_V_0, 12, FXCMAP_CMap::None, - NULL, 0, -1}, + nullptr, 0, -1}, {"HKscs-B5-H", FXCMAP_CMap::Range, g_FXCMAP_HKscs_B5_H_5, 1210, - FXCMAP_CMap::None, NULL, 0, 0}, + FXCMAP_CMap::None, nullptr, 0, 0}, {"HKscs-B5-V", FXCMAP_CMap::Range, g_FXCMAP_HKscs_B5_V_5, 13, - FXCMAP_CMap::None, NULL, 0, -1}, + FXCMAP_CMap::None, nullptr, 0, -1}, {"ETen-B5-H", FXCMAP_CMap::Range, g_FXCMAP_ETen_B5_H_0, 254, - FXCMAP_CMap::None, NULL, 0, 0}, + FXCMAP_CMap::None, nullptr, 0, 0}, {"ETen-B5-V", FXCMAP_CMap::Range, g_FXCMAP_ETen_B5_V_0, 13, - FXCMAP_CMap::None, NULL, 0, -1}, + FXCMAP_CMap::None, nullptr, 0, -1}, {"ETenms-B5-H", FXCMAP_CMap::Range, g_FXCMAP_ETenms_B5_H_0, 1, - FXCMAP_CMap::None, NULL, 0, -2}, + FXCMAP_CMap::None, nullptr, 0, -2}, {"ETenms-B5-V", FXCMAP_CMap::Range, g_FXCMAP_ETenms_B5_V_0, 18, - FXCMAP_CMap::None, NULL, 0, -1}, + FXCMAP_CMap::None, nullptr, 0, -1}, {"CNS-EUC-H", FXCMAP_CMap::Range, g_FXCMAP_CNS_EUC_H_0, 157, FXCMAP_CMap::Range, g_FXCMAP_CNS_EUC_H_0_DWord, 238, 0}, {"CNS-EUC-V", FXCMAP_CMap::Range, g_FXCMAP_CNS_EUC_V_0, 180, FXCMAP_CMap::Range, g_FXCMAP_CNS_EUC_V_0_DWord, 261, 0}, {"UniCNS-UCS2-H", FXCMAP_CMap::Range, g_FXCMAP_UniCNS_UCS2_H_3, 16418, - FXCMAP_CMap::None, NULL, 0, 0}, + FXCMAP_CMap::None, nullptr, 0, 0}, {"UniCNS-UCS2-V", FXCMAP_CMap::Range, g_FXCMAP_UniCNS_UCS2_V_3, 13, - FXCMAP_CMap::None, NULL, 0, -1}, + FXCMAP_CMap::None, nullptr, 0, -1}, {"UniCNS-UTF16-H", FXCMAP_CMap::Single, g_FXCMAP_UniCNS_UTF16_H_0, 14557, - FXCMAP_CMap::None, NULL, 0, 0}, + FXCMAP_CMap::None, nullptr, 0, 0}, {"UniCNS-UTF16-V", FXCMAP_CMap::Range, g_FXCMAP_UniCNS_UCS2_V_3, 13, - FXCMAP_CMap::None, NULL, 0, -1}, + FXCMAP_CMap::None, nullptr, 0, -1}, }; void CPDF_ModuleMgr::LoadEmbeddedCNS1CMaps() { diff --git a/core/fpdfapi/fpdf_cmaps/GB1/cmaps_gb1.cpp b/core/fpdfapi/fpdf_cmaps/GB1/cmaps_gb1.cpp index 34a43858b4..35e4894382 100644 --- a/core/fpdfapi/fpdf_cmaps/GB1/cmaps_gb1.cpp +++ b/core/fpdfapi/fpdf_cmaps/GB1/cmaps_gb1.cpp @@ -14,33 +14,33 @@ static const FXCMAP_CMap g_FXCMAP_GB1_cmaps[] = { {"GB-EUC-H", FXCMAP_CMap::Range, g_FXCMAP_GB_EUC_H_0, 90, FXCMAP_CMap::None, - NULL, 0, 0}, + nullptr, 0, 0}, {"GB-EUC-V", FXCMAP_CMap::Range, g_FXCMAP_GB_EUC_V_0, 20, FXCMAP_CMap::None, - NULL, 0, -1}, + nullptr, 0, -1}, {"GBpc-EUC-H", FXCMAP_CMap::Range, g_FXCMAP_GBpc_EUC_H_0, 91, - FXCMAP_CMap::None, NULL, 0, 0}, + FXCMAP_CMap::None, nullptr, 0, 0}, {"GBpc-EUC-V", FXCMAP_CMap::Range, g_FXCMAP_GBpc_EUC_V_0, 20, - FXCMAP_CMap::None, NULL, 0, -1}, + FXCMAP_CMap::None, nullptr, 0, -1}, {"GBK-EUC-H", FXCMAP_CMap::Range, g_FXCMAP_GBK_EUC_H_2, 4071, - FXCMAP_CMap::None, NULL, 0, 0}, + FXCMAP_CMap::None, nullptr, 0, 0}, {"GBK-EUC-V", FXCMAP_CMap::Range, g_FXCMAP_GBK_EUC_V_2, 20, - FXCMAP_CMap::None, NULL, 0, -1}, + FXCMAP_CMap::None, nullptr, 0, -1}, {"GBKp-EUC-H", FXCMAP_CMap::Range, g_FXCMAP_GBKp_EUC_H_2, 4070, - FXCMAP_CMap::None, NULL, 0, -2}, + FXCMAP_CMap::None, nullptr, 0, -2}, {"GBKp-EUC-V", FXCMAP_CMap::Range, g_FXCMAP_GBKp_EUC_V_2, 20, - FXCMAP_CMap::None, NULL, 0, -1}, + FXCMAP_CMap::None, nullptr, 0, -1}, {"GBK2K-H", FXCMAP_CMap::Range, g_FXCMAP_GBK2K_H_5, 4071, FXCMAP_CMap::Single, g_FXCMAP_GBK2K_H_5_DWord, 1017, -4}, {"GBK2K-V", FXCMAP_CMap::Range, g_FXCMAP_GBK2K_V_5, 41, FXCMAP_CMap::None, - NULL, 0, -1}, + nullptr, 0, -1}, {"UniGB-UCS2-H", FXCMAP_CMap::Range, g_FXCMAP_UniGB_UCS2_H_4, 13825, - FXCMAP_CMap::None, NULL, 0, 0}, + FXCMAP_CMap::None, nullptr, 0, 0}, {"UniGB-UCS2-V", FXCMAP_CMap::Range, g_FXCMAP_UniGB_UCS2_V_4, 24, - FXCMAP_CMap::None, NULL, 0, -1}, + FXCMAP_CMap::None, nullptr, 0, -1}, {"UniGB-UTF16-H", FXCMAP_CMap::Range, g_FXCMAP_UniGB_UCS2_H_4, 13825, - FXCMAP_CMap::None, NULL, 0, 0}, + FXCMAP_CMap::None, nullptr, 0, 0}, {"UniGB-UTF16-V", FXCMAP_CMap::Range, g_FXCMAP_UniGB_UCS2_V_4, 24, - FXCMAP_CMap::None, NULL, 0, -1}, + FXCMAP_CMap::None, nullptr, 0, -1}, }; void CPDF_ModuleMgr::LoadEmbeddedGB1CMaps() { diff --git a/core/fpdfapi/fpdf_cmaps/Japan1/cmaps_japan1.cpp b/core/fpdfapi/fpdf_cmaps/Japan1/cmaps_japan1.cpp index 6299579081..595989be3c 100644 --- a/core/fpdfapi/fpdf_cmaps/Japan1/cmaps_japan1.cpp +++ b/core/fpdfapi/fpdf_cmaps/Japan1/cmaps_japan1.cpp @@ -14,43 +14,45 @@ static const FXCMAP_CMap g_FXCMAP_Japan1_cmaps[] = { {"83pv-RKSJ-H", FXCMAP_CMap::Range, g_FXCMAP_83pv_RKSJ_H_1, 222, - FXCMAP_CMap::None, NULL, 0, 0}, + FXCMAP_CMap::None, nullptr, 0, 0}, {"90ms-RKSJ-H", FXCMAP_CMap::Range, g_FXCMAP_90ms_RKSJ_H_2, 171, - FXCMAP_CMap::None, NULL, 0, 0}, + FXCMAP_CMap::None, nullptr, 0, 0}, {"90ms-RKSJ-V", FXCMAP_CMap::Range, g_FXCMAP_90ms_RKSJ_V_2, 78, - FXCMAP_CMap::None, NULL, 0, -1}, + FXCMAP_CMap::None, nullptr, 0, -1}, {"90msp-RKSJ-H", FXCMAP_CMap::Range, g_FXCMAP_90msp_RKSJ_H_2, 170, - FXCMAP_CMap::None, NULL, 0, -2}, + FXCMAP_CMap::None, nullptr, 0, -2}, {"90msp-RKSJ-V", FXCMAP_CMap::Range, g_FXCMAP_90msp_RKSJ_V_2, 78, - FXCMAP_CMap::None, NULL, 0, -1}, + FXCMAP_CMap::None, nullptr, 0, -1}, {"90pv-RKSJ-H", FXCMAP_CMap::Range, g_FXCMAP_90pv_RKSJ_H_1, 263, - FXCMAP_CMap::None, NULL, 0, 0}, + FXCMAP_CMap::None, nullptr, 0, 0}, {"Add-RKSJ-H", FXCMAP_CMap::Range, g_FXCMAP_Add_RKSJ_H_1, 635, - FXCMAP_CMap::None, NULL, 0, 0}, + FXCMAP_CMap::None, nullptr, 0, 0}, {"Add-RKSJ-V", FXCMAP_CMap::Range, g_FXCMAP_Add_RKSJ_V_1, 57, - FXCMAP_CMap::None, NULL, 0, -1}, + FXCMAP_CMap::None, nullptr, 0, -1}, {"EUC-H", FXCMAP_CMap::Range, g_FXCMAP_EUC_H_1, 120, FXCMAP_CMap::None, - NULL, 0, 0}, - {"EUC-V", FXCMAP_CMap::Range, g_FXCMAP_EUC_V_1, 27, FXCMAP_CMap::None, NULL, - 0, -1}, + nullptr, 0, 0}, + {"EUC-V", FXCMAP_CMap::Range, g_FXCMAP_EUC_V_1, 27, FXCMAP_CMap::None, + nullptr, 0, -1}, {"Ext-RKSJ-H", FXCMAP_CMap::Range, g_FXCMAP_Ext_RKSJ_H_2, 665, - FXCMAP_CMap::None, NULL, 0, -4}, + FXCMAP_CMap::None, nullptr, 0, -4}, {"Ext-RKSJ-V", FXCMAP_CMap::Range, g_FXCMAP_Ext_RKSJ_V_2, 39, - FXCMAP_CMap::None, NULL, 0, -1}, - {"H", FXCMAP_CMap::Range, g_FXCMAP_H_1, 118, FXCMAP_CMap::None, NULL, 0, 0}, - {"V", FXCMAP_CMap::Range, g_FXCMAP_V_1, 27, FXCMAP_CMap::None, NULL, 0, -1}, + FXCMAP_CMap::None, nullptr, 0, -1}, + {"H", FXCMAP_CMap::Range, g_FXCMAP_H_1, 118, FXCMAP_CMap::None, nullptr, 0, + 0}, + {"V", FXCMAP_CMap::Range, g_FXCMAP_V_1, 27, FXCMAP_CMap::None, nullptr, 0, + -1}, {"UniJIS-UCS2-H", FXCMAP_CMap::Single, g_FXCMAP_UniJIS_UCS2_H_4, 9772, - FXCMAP_CMap::None, NULL, 0, 0}, + FXCMAP_CMap::None, nullptr, 0, 0}, {"UniJIS-UCS2-V", FXCMAP_CMap::Single, g_FXCMAP_UniJIS_UCS2_V_4, 251, - FXCMAP_CMap::None, NULL, 0, -1}, + FXCMAP_CMap::None, nullptr, 0, -1}, {"UniJIS-UCS2-HW-H", FXCMAP_CMap::Range, g_FXCMAP_UniJIS_UCS2_HW_H_4, 4, - FXCMAP_CMap::None, NULL, 0, -2}, + FXCMAP_CMap::None, nullptr, 0, -2}, {"UniJIS-UCS2-HW-V", FXCMAP_CMap::Range, g_FXCMAP_UniJIS_UCS2_HW_V_4, 199, - FXCMAP_CMap::None, NULL, 0, -1}, + FXCMAP_CMap::None, nullptr, 0, -1}, {"UniJIS-UTF16-H", FXCMAP_CMap::Single, g_FXCMAP_UniJIS_UCS2_H_4, 9772, - FXCMAP_CMap::None, NULL, 0, 0}, + FXCMAP_CMap::None, nullptr, 0, 0}, {"UniJIS-UTF16-V", FXCMAP_CMap::Single, g_FXCMAP_UniJIS_UCS2_V_4, 251, - FXCMAP_CMap::None, NULL, 0, -1}, + FXCMAP_CMap::None, nullptr, 0, -1}, }; void CPDF_ModuleMgr::LoadEmbeddedJapan1CMaps() { diff --git a/core/fpdfapi/fpdf_cmaps/Korea1/cmaps_korea1.cpp b/core/fpdfapi/fpdf_cmaps/Korea1/cmaps_korea1.cpp index ac6346cf7f..1649bf429f 100644 --- a/core/fpdfapi/fpdf_cmaps/Korea1/cmaps_korea1.cpp +++ b/core/fpdfapi/fpdf_cmaps/Korea1/cmaps_korea1.cpp @@ -14,27 +14,27 @@ static const FXCMAP_CMap g_FXCMAP_Korea1_cmaps[] = { {"KSC-EUC-H", FXCMAP_CMap::Range, g_FXCMAP_KSC_EUC_H_0, 467, - FXCMAP_CMap::None, NULL, 0, 0}, + FXCMAP_CMap::None, nullptr, 0, 0}, {"KSC-EUC-V", FXCMAP_CMap::Range, g_FXCMAP_KSC_EUC_V_0, 16, - FXCMAP_CMap::None, NULL, 0, -1}, + FXCMAP_CMap::None, nullptr, 0, -1}, {"KSCms-UHC-H", FXCMAP_CMap::Range, g_FXCMAP_KSCms_UHC_H_1, 675, - FXCMAP_CMap::None, NULL, 0, -2}, + FXCMAP_CMap::None, nullptr, 0, -2}, {"KSCms-UHC-V", FXCMAP_CMap::Range, g_FXCMAP_KSCms_UHC_V_1, 16, - FXCMAP_CMap::None, NULL, 0, -1}, + FXCMAP_CMap::None, nullptr, 0, -1}, {"KSCms-UHC-HW-H", FXCMAP_CMap::Range, g_FXCMAP_KSCms_UHC_HW_H_1, 675, - FXCMAP_CMap::None, NULL, 0, 0}, + FXCMAP_CMap::None, nullptr, 0, 0}, {"KSCms-UHC-HW-V", FXCMAP_CMap::Range, g_FXCMAP_KSCms_UHC_HW_V_1, 16, - FXCMAP_CMap::None, NULL, 0, -1}, + FXCMAP_CMap::None, nullptr, 0, -1}, {"KSCpc-EUC-H", FXCMAP_CMap::Range, g_FXCMAP_KSCpc_EUC_H_0, 509, - FXCMAP_CMap::None, NULL, 0, -6}, + FXCMAP_CMap::None, nullptr, 0, -6}, {"UniKS-UCS2-H", FXCMAP_CMap::Range, g_FXCMAP_UniKS_UCS2_H_1, 8394, - FXCMAP_CMap::None, NULL, 0, 0}, + FXCMAP_CMap::None, nullptr, 0, 0}, {"UniKS-UCS2-V", FXCMAP_CMap::Range, g_FXCMAP_UniKS_UCS2_V_1, 18, - FXCMAP_CMap::None, NULL, 0, -1}, + FXCMAP_CMap::None, nullptr, 0, -1}, {"UniKS-UTF16-H", FXCMAP_CMap::Single, g_FXCMAP_UniKS_UTF16_H_0, 158, - FXCMAP_CMap::None, NULL, 0, -2}, + FXCMAP_CMap::None, nullptr, 0, -2}, {"UniKS-UTF16-V", FXCMAP_CMap::Range, g_FXCMAP_UniKS_UCS2_V_1, 18, - FXCMAP_CMap::None, NULL, 0, -1}, + FXCMAP_CMap::None, nullptr, 0, -1}, }; void CPDF_ModuleMgr::LoadEmbeddedKorea1CMaps() { diff --git a/core/fpdfapi/fpdf_cmaps/fpdf_cmaps.cpp b/core/fpdfapi/fpdf_cmaps/fpdf_cmaps.cpp index e0c5b9b7d6..2a9900df91 100644 --- a/core/fpdfapi/fpdf_cmaps/fpdf_cmaps.cpp +++ b/core/fpdfapi/fpdf_cmaps/fpdf_cmaps.cpp @@ -14,7 +14,7 @@ void FPDFAPI_FindEmbeddedCMap(const char* name, int charset, int coding, const FXCMAP_CMap*& pMap) { - pMap = NULL; + pMap = nullptr; CPDF_FontGlobals* pFontGlobals = CPDF_ModuleMgr::Get()->GetPageModule()->GetFontGlobals(); const FXCMAP_CMap* pCMaps = |