diff options
author | tsepez <tsepez@chromium.org> | 2016-04-13 15:41:21 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-04-13 15:41:21 -0700 |
commit | b4c9f3f04673753da30011e9f1282cd5d1fa0f40 (patch) | |
tree | 9890d43409c8d60b1041de921c961067907419fb /core/fpdfapi/fpdf_font | |
parent | cdce75706de7e76e73550a0582e1fd28af324fd0 (diff) | |
download | pdfium-b4c9f3f04673753da30011e9f1282cd5d1fa0f40.tar.xz |
Remove implicit cast from CFX_ByteString to (const char*).
BUG=
Review URL: https://codereview.chromium.org/1885973002
Diffstat (limited to 'core/fpdfapi/fpdf_font')
-rw-r--r-- | core/fpdfapi/fpdf_font/cpdf_font.cpp | 2 | ||||
-rw-r--r-- | core/fpdfapi/fpdf_font/cpdf_type3font.cpp | 3 | ||||
-rw-r--r-- | core/fpdfapi/fpdf_font/fpdf_font_cid.cpp | 4 |
3 files changed, 5 insertions, 4 deletions
diff --git a/core/fpdfapi/fpdf_font/cpdf_font.cpp b/core/fpdfapi/fpdf_font/cpdf_font.cpp index 7a6043ad87..3dfadeda9e 100644 --- a/core/fpdfapi/fpdf_font/cpdf_font.cpp +++ b/core/fpdfapi/fpdf_font/cpdf_font.cpp @@ -485,7 +485,7 @@ const FX_CHAR* CPDF_Font::GetAdobeCharName(int iBaseEncoding, const FX_CHAR* name = nullptr; if (pCharNames) - name = pCharNames[charcode]; + name = pCharNames[charcode].c_str(); if ((!name || name[0] == 0) && iBaseEncoding) name = PDF_CharNameFromPredefinedCharSet(iBaseEncoding, charcode); return name && name[0] ? name : nullptr; diff --git a/core/fpdfapi/fpdf_font/cpdf_type3font.cpp b/core/fpdfapi/fpdf_font/cpdf_type3font.cpp index 92f5102cdb..40fb54fbc7 100644 --- a/core/fpdfapi/fpdf_font/cpdf_type3font.cpp +++ b/core/fpdfapi/fpdf_font/cpdf_type3font.cpp @@ -73,7 +73,8 @@ FX_BOOL CPDF_Type3Font::Load() { LoadPDFEncoding(pEncoding, m_BaseEncoding, m_pCharNames, FALSE, FALSE); if (m_pCharNames) { for (int i = 0; i < 256; i++) { - m_Encoding.m_Unicodes[i] = PDF_UnicodeFromAdobeName(m_pCharNames[i]); + m_Encoding.m_Unicodes[i] = + PDF_UnicodeFromAdobeName(m_pCharNames[i].c_str()); if (m_Encoding.m_Unicodes[i] == 0) { m_Encoding.m_Unicodes[i] = i; } diff --git a/core/fpdfapi/fpdf_font/fpdf_font_cid.cpp b/core/fpdfapi/fpdf_font/fpdf_font_cid.cpp index da6b8de35b..f84fa9f2f9 100644 --- a/core/fpdfapi/fpdf_font/fpdf_font_cid.cpp +++ b/core/fpdfapi/fpdf_font/fpdf_font_cid.cpp @@ -304,7 +304,7 @@ CPDF_CMap* CPDF_CMapManager::GetPredefinedCMap(const CFX_ByteString& name, CPDF_CMap* CPDF_CMapManager::LoadPredefinedCMap(const CFX_ByteString& name, FX_BOOL bPromptCJK) { CPDF_CMap* pCMap = new CPDF_CMap; - const FX_CHAR* pname = name; + const FX_CHAR* pname = name.c_str(); if (*pname == '/') { pname++; } @@ -315,7 +315,7 @@ CPDF_CMap* CPDF_CMapManager::LoadPredefinedCMap(const CFX_ByteString& name, void CPDF_CMapManager::ReloadAll() { for (const auto& pair : m_CMaps) { CPDF_CMap* pCMap = pair.second; - pCMap->LoadPredefined(this, pair.first, FALSE); + pCMap->LoadPredefined(this, pair.first.c_str(), FALSE); } for (size_t i = 0; i < FX_ArraySize(m_CID2UnicodeMaps); ++i) { if (CPDF_CID2UnicodeMap* pMap = m_CID2UnicodeMaps[i]) { |