DescriptionGetting rid of more (FX_LPCWSTR) casts and fixing two bugs revealed by this.
Since casts to FX_LPCWSTR have been shown to hide bugs I tried removing
more of them, targeting those places where a cast was used to force a
conversion from CFX_WideString to FX_LPCWSTR, replacing these casts with
calls to the newly added .c_str() function. This revealed two places
where the cast was hiding a bug -- where ->c_str() was required instead!
This removes ~33 FX_LPCWSTR casts and there are ~31 left, many of which
will go away in some future change.
Also includes this change:
Removing unnecessary casts from wchar_t* to wchar_t*, by various names.
Original patch from Bruce Dawson(brucedawson@chromium.org)
R=bo_xu@foxitsoftware.com, tsepez@chromium.org
Committed: https://pdfium.googlesource.com/pdfium/+/b69da0b96ffdad124efd1b48d51c617bb216a98e
Patch Set 1 #Patch Set 2 : Merged latest changes including pdfium_test.cc fix. #
Total comments: 4
Patch Set 3 : Rebasing to latest origin/master. #
Total comments: 2
Patch Set 4 : Tweaking comments for implicit and explicit string conversions. #
Total comments: 2
Patch Set 5 : Tweaking comment based on Tom's feedback. #Patch Set 6 : Updated to latest code -- fewer diffs now. #Patch Set 7 : Simplified GetAttrValue to just assign *pValue and to share code. #
Messages
Total messages: 19 (1 generated)
|