Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(310)

Unified Diff: xfa/src/fxfa/src/fm2js/xfa_fm2jscontext.cpp

Issue 841203002: Do not convert from string literal to wchar_t* (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: const pointer Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/src/fxfa/src/fm2js/xfa_fm2jscontext.cpp
diff --git a/xfa/src/fxfa/src/fm2js/xfa_fm2jscontext.cpp b/xfa/src/fxfa/src/fm2js/xfa_fm2jscontext.cpp
index 330bfcfcf520fd3d621c58a81f2a490e5333d56e..be74852098cec496a6ab4dc4d09a1dc74a1fb053 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;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698