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

Issue 841203002: Do not convert from string literal to wchar_t* (Closed)

Created:
5 years, 11 months ago by Bo Xu
Modified:
5 years, 11 months ago
Reviewers:
brucedawson
CC:
pdfium-reviews_googlegroups.com
Base URL:
https://pdfium.googlesource.com/pdfium.git@xfa
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Patch Set 1 #

Total comments: 2

Patch Set 2 : Better fix #

Patch Set 3 : const pointer #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2 lines, -2 lines) Patch
M xfa/src/fxfa/src/fm2js/xfa_fm2jscontext.cpp View 1 2 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 8 (1 generated)
Bo Xu
Hi Bruce, buiding in linxu, clang complains that "can not convert from string literal to ...
5 years, 11 months ago (2015-01-08 22:45:43 UTC) #2
brucedawson
Better solution. Look for opportunities to mark variables with const -- it prevents this, and ...
5 years, 11 months ago (2015-01-08 22:52:08 UTC) #3
Bo Xu
https://codereview.chromium.org/841203002/diff/1/xfa/src/fxfa/src/fm2js/xfa_fm2jscontext.cpp File xfa/src/fxfa/src/fm2js/xfa_fm2jscontext.cpp (right): https://codereview.chromium.org/841203002/diff/1/xfa/src/fxfa/src/fm2js/xfa_fm2jscontext.cpp#newcode3961 xfa/src/fxfa/src/fm2js/xfa_fm2jscontext.cpp:3961: FX_WCHAR strCode[] = L"0123456789abcdef"; On 2015/01/08 22:52:08, brucedawson wrote: ...
5 years, 11 months ago (2015-01-08 22:55:39 UTC) #4
Bo Xu
> So, "const FX_WCHAR* const". Is patch 2 ok? Or I can change to const ...
5 years, 11 months ago (2015-01-08 23:04:54 UTC) #5
brucedawson
lgtm
5 years, 11 months ago (2015-01-09 00:13:05 UTC) #6
brucedawson
On 2015/01/09 00:13:05, brucedawson wrote: > lgtm const FX_LPCWSTR is perfect.
5 years, 11 months ago (2015-01-09 00:14:04 UTC) #7
Bo Xu
5 years, 11 months ago (2015-01-09 00:29:35 UTC) #8
Message was sent while issue was closed.
Committed patchset #3 (id:40001) manually as
9478b521b01a9cc94a0d6cfe43b8e0341b5b82eb (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698