From c4dce690f433a41c4429e872c2306e09b14c5d9f Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Tue, 26 Jun 2018 19:48:59 +0000 Subject: Use pdfium::span<> in cpdf_fontglobals.h Required moving some sizes to .h file for default construction of spans from c-style arrays. Change-Id: I45c42103f3575bc83e57a085ad4e8f16698468d3 Reviewed-on: https://pdfium-review.googlesource.com/36190 Reviewed-by: dsinclair Commit-Queue: Tom Sepez --- core/fpdfapi/cmaps/GB1/cmaps_gb1.cpp | 6 ++---- core/fpdfapi/cmaps/GB1/cmaps_gb1.h | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) (limited to 'core/fpdfapi/cmaps/GB1') diff --git a/core/fpdfapi/cmaps/GB1/cmaps_gb1.cpp b/core/fpdfapi/cmaps/GB1/cmaps_gb1.cpp index f35161ab97..26022c623d 100644 --- a/core/fpdfapi/cmaps/GB1/cmaps_gb1.cpp +++ b/core/fpdfapi/cmaps/GB1/cmaps_gb1.cpp @@ -41,8 +41,6 @@ static const FXCMAP_CMap g_FXCMAP_GB1_cmaps[] = { void CPDF_ModuleMgr::LoadEmbeddedGB1CMaps() { CPDF_FontGlobals* pFontGlobals = CPDF_ModuleMgr::Get()->GetPageModule()->GetFontGlobals(); - pFontGlobals->SetEmbeddedCharset(CIDSET_GB1, g_FXCMAP_GB1_cmaps, - FX_ArraySize(g_FXCMAP_GB1_cmaps)); - pFontGlobals->SetEmbeddedToUnicode(CIDSET_GB1, g_FXCMAP_GB1CID2Unicode_5, - 30284); + pFontGlobals->SetEmbeddedCharset(CIDSET_GB1, g_FXCMAP_GB1_cmaps); + pFontGlobals->SetEmbeddedToUnicode(CIDSET_GB1, g_FXCMAP_GB1CID2Unicode_5); } diff --git a/core/fpdfapi/cmaps/GB1/cmaps_gb1.h b/core/fpdfapi/cmaps/GB1/cmaps_gb1.h index a475af1568..989d9ce163 100644 --- a/core/fpdfapi/cmaps/GB1/cmaps_gb1.h +++ b/core/fpdfapi/cmaps/GB1/cmaps_gb1.h @@ -24,6 +24,6 @@ extern const FXCMAP_DWordCIDMap g_FXCMAP_GBK2K_H_5_DWord[]; extern const uint16_t g_FXCMAP_GBK2K_V_5[]; extern const uint16_t g_FXCMAP_UniGB_UCS2_H_4[]; extern const uint16_t g_FXCMAP_UniGB_UCS2_V_4[]; -extern const uint16_t g_FXCMAP_GB1CID2Unicode_5[]; +extern const uint16_t g_FXCMAP_GB1CID2Unicode_5[30284]; #endif // CORE_FPDFAPI_CMAPS_GB1_CMAPS_GB1_H_ -- cgit v1.2.3