summaryrefslogtreecommitdiff
path: root/xfa
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2017-04-13 13:41:24 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-04-13 22:06:11 +0000
commit3cfff70244e31f48068c32cbc4c070468f4c3e85 (patch)
tree331dc0766a512ac5854c4deba76a6174942cdc02 /xfa
parent7b7c6532310eeeabadae7b34fdf86f4a890951e8 (diff)
downloadpdfium-3cfff70244e31f48068c32cbc4c070468f4c3e85.tar.xz
Add ability to make StringCs from std::vector<>s.
Pre-cursor to using more std::vector<uint8_t> as byte buffers. The widestring test case is more complicated, where we're not sure of having any particular uint*_t type to match wchar_t. Change-Id: Ic27980f16cdbc61fac7c11f39a85eea58d19bacb Reviewed-on: https://pdfium-review.googlesource.com/4153 Reviewed-by: dsinclair <dsinclair@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'xfa')
-rw-r--r--xfa/fxfa/fm2js/xfa_fm2jscontext.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp b/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp
index 56a99157d3..ead2a7dbe3 100644
--- a/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp
+++ b/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp
@@ -4642,9 +4642,9 @@ void CXFA_FM2JSContext::Get(CFXJSE_Value* pThis,
return;
int32_t size = pFile->GetSize();
- std::vector<uint8_t> pData(size);
- pFile->ReadBlock(pData.data(), size);
- args.GetReturnValue()->SetString(CFX_ByteStringC(pData.data(), size));
+ std::vector<uint8_t> dataBuf(size);
+ pFile->ReadBlock(dataBuf.data(), size);
+ args.GetReturnValue()->SetString(CFX_ByteStringC(dataBuf));
}
// static