diff options
author | Tom Sepez <tsepez@chromium.org> | 2018-04-09 20:33:45 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-04-09 20:33:45 +0000 |
commit | e372ad7333bdd6bb0c579cf074843ef0c6f3414f (patch) | |
tree | 9928344d0def23d3fb070713a88947aceb6b5c71 /core/fpdfapi/font/cpdf_cidfont.cpp | |
parent | 0d8e530fbf898c1ba1ba4d3d91aa17e3fd4d8317 (diff) | |
download | pdfium-e372ad7333bdd6bb0c579cf074843ef0c6f3414f.tar.xz |
Use ByteStringView / pdfium::span in CPDF font as appropriate.chromium/3393
Change-Id: I92c7ba605bf95a9023ad046b8dddebe0a0592802
Reviewed-on: https://pdfium-review.googlesource.com/29992
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fpdfapi/font/cpdf_cidfont.cpp')
-rw-r--r-- | core/fpdfapi/font/cpdf_cidfont.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/core/fpdfapi/font/cpdf_cidfont.cpp b/core/fpdfapi/font/cpdf_cidfont.cpp index 7de4d7cd82..4d3ffdf41f 100644 --- a/core/fpdfapi/font/cpdf_cidfont.cpp +++ b/core/fpdfapi/font/cpdf_cidfont.cpp @@ -751,18 +751,17 @@ int CPDF_CIDFont::GlyphFromCharCode(uint32_t charcode, bool* pVertGlyph) { return pdata[0] * 256 + pdata[1]; } -uint32_t CPDF_CIDFont::GetNextChar(const char* pString, - int nStrLen, - int& offset) const { - return m_pCMap->GetNextChar(pString, nStrLen, offset); +uint32_t CPDF_CIDFont::GetNextChar(const ByteStringView& pString, + size_t& offset) const { + return m_pCMap->GetNextChar(pString, offset); } int CPDF_CIDFont::GetCharSize(uint32_t charcode) const { return m_pCMap->GetCharSize(charcode); } -int CPDF_CIDFont::CountChar(const char* pString, int size) const { - return m_pCMap->CountChar(pString, size); +size_t CPDF_CIDFont::CountChar(const ByteStringView& pString) const { + return m_pCMap->CountChar(pString); } int CPDF_CIDFont::AppendChar(char* str, uint32_t charcode) const { |