From 9478b521b01a9cc94a0d6cfe43b8e0341b5b82eb Mon Sep 17 00:00:00 2001 From: Bo Xu Date: Thu, 8 Jan 2015 16:29:03 -0800 Subject: Do not convert from string literal to wchar_t* R=brucedawson@chromium.org Review URL: https://codereview.chromium.org/841203002 --- xfa/src/fxfa/src/fm2js/xfa_fm2jscontext.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'xfa') diff --git a/xfa/src/fxfa/src/fm2js/xfa_fm2jscontext.cpp b/xfa/src/fxfa/src/fm2js/xfa_fm2jscontext.cpp index 330bfcfcf5..be74852098 100644 --- a/xfa/src/fxfa/src/fm2js/xfa_fm2jscontext.cpp +++ b/xfa/src/fxfa/src/fm2js/xfa_fm2jscontext.cpp @@ -3958,7 +3958,7 @@ void CXFA_FM2JSContext::EncodeURL (FX_BSTR szURLString, CFX_ByteTextBuf &szResu FX_WCHAR strUnsafe[] = { ' ', '<', '>', '"', '#', '%', '{', '}', '|', '\\', '^', '~', '[', ']', '`' }; FX_WCHAR strReserved[] = {';', '/', '?', ':', '@', '=', '&'}; FX_WCHAR strSpecial[] = {'$', '-', '+', '!', '*', '\'', '(', ')', ','}; - FX_WCHAR* strCode = L"0123456789abcdef"; + const FX_LPCWSTR strCode = L"0123456789abcdef"; for (FX_INT32 u = 0; u < iLength; ++u) { ch = wsURLString.GetAt(u); FX_INT32 i = 0; @@ -4128,7 +4128,7 @@ void CXFA_FM2JSContext::EncodeXML (FX_BSTR szXMLString, CFX_ByteTextBuf &szResu L"lt", L"gt" }; - FX_WCHAR* strCode = L"0123456789abcdef"; + const FX_LPCWSTR strCode = L"0123456789abcdef"; FX_WCHAR ch = 0; FX_INT32 iLength = wsXMLString.GetLength(); FX_INT32 iIndex = 0; -- cgit v1.2.3