diff options
author | Tom Sepez <tsepez@chromium.org> | 2017-04-07 11:42:38 -0700 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-04-07 19:09:24 +0000 |
commit | 1835a6fb98286817cdf656f4d1e223bd85ee378f (patch) | |
tree | e8bc07753b2c116f9dd530da41539ebac419155e /core/fpdfdoc/cpvt_generateap.cpp | |
parent | 6a5c20cd08748da5969cbab756c3e8a6dd27bfbc (diff) | |
download | pdfium-1835a6fb98286817cdf656f4d1e223bd85ee378f.tar.xz |
Tweak CFDF_Font::AppendChar()
Pass in/out argument as a pointer.
Avoid pointless malloc just to copy in multibyte case. Then we can
avoid special-casing the single-byte case.
Change-Id: I3dd2d57e08ef6ad7b78ea38398b228fa41a9b3e6
Reviewed-on: https://pdfium-review.googlesource.com/3950
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fpdfdoc/cpvt_generateap.cpp')
-rw-r--r-- | core/fpdfdoc/cpvt_generateap.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/fpdfdoc/cpvt_generateap.cpp b/core/fpdfdoc/cpvt_generateap.cpp index 7e895e5850..bcd3aa1d00 100644 --- a/core/fpdfdoc/cpvt_generateap.cpp +++ b/core/fpdfdoc/cpvt_generateap.cpp @@ -1338,7 +1338,7 @@ CFX_ByteString CPVT_GenerateAP::GetPDFWordString(IPVT_FontMap* pFontMap, } else { uint32_t dwCharCode = pPDFFont->CharCodeFromUnicode(Word); if (dwCharCode != CPDF_Font::kInvalidCharCode) - pPDFFont->AppendChar(sWord, dwCharCode); + pPDFFont->AppendChar(&sWord, dwCharCode); } } return sWord; |