From 3cfff70244e31f48068c32cbc4c070468f4c3e85 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Thu, 13 Apr 2017 13:41:24 -0700 Subject: Add ability to make StringCs from std::vector<>s. Pre-cursor to using more std::vector 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 Reviewed-by: Lei Zhang Commit-Queue: Tom Sepez --- xfa/fxfa/fm2js/xfa_fm2jscontext.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'xfa') 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 pData(size); - pFile->ReadBlock(pData.data(), size); - args.GetReturnValue()->SetString(CFX_ByteStringC(pData.data(), size)); + std::vector dataBuf(size); + pFile->ReadBlock(dataBuf.data(), size); + args.GetReturnValue()->SetString(CFX_ByteStringC(dataBuf)); } // static -- cgit v1.2.3