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

Issue 1919563002: Pass CFX_*StringCs to FX_HashCode_GETA and _GETW hash functions. (Closed)

Created:
4 years, 8 months ago by Tom Sepez
Modified:
4 years, 8 months ago
Reviewers:
Lei Zhang
CC:
pdfium-reviews_googlegroups.com
Base URL:
https://pdfium.googlesource.com/pdfium.git@master
Target Ref:
refs/heads/master
Project:
pdfium
Visibility:
Public.

Description

Pass CFX_*StringCs to FX_HashCode_GETA and _GETW hash functions. Too many calls were of the form fn(x.c_str(), x.GetLength()) which is an anti-pattern given the StringC classes which tie these together. There are a few places where explicit CFX_*StringCs are constructed, but this can be avoided by changing the args to these functions in the same manner. Removed String_ from name of functions since it added little value. Also removed default argument. Committed: https://pdfium.googlesource.com/pdfium/+/b6853cfe4fd1ee089dfdd0cb09bbc4063532ef82

Patch Set 1 #

Patch Set 2 : Fix win-only section. #

Patch Set 3 : Fix bad default arg, style. #

Patch Set 4 : Another always-true #ifdef #

Patch Set 5 : Pull some IsEmpty() ? 0 since we test for empty hashing to 0. #

Patch Set 6 : win again #

Patch Set 7 : win again again #

Patch Set 8 : win again again again #

Total comments: 16

Patch Set 9 : fix issue from c4 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+266 lines, -332 lines) Patch
M core/fxcrt/fx_extension.cpp View 1 2 3 4 5 3 chunks +10 lines, -18 lines 0 comments Download
M core/fxcrt/fx_extension_unittest.cpp View 1 2 1 chunk +14 lines, -0 lines 0 comments Download
M core/fxcrt/include/fx_ext.h View 1 chunk +2 lines, -6 lines 0 comments Download
M fpdfsdk/javascript/global.cpp View 1 chunk +1 line, -1 line 0 comments Download
M xfa/fde/css/fde_csscache.cpp View 1 2 1 chunk +6 lines, -13 lines 0 comments Download
M xfa/fde/css/fde_cssdatatable.h View 1 2 3 chunks +8 lines, -10 lines 0 comments Download
M xfa/fde/css/fde_cssdatatable.cpp View 1 2 7 chunks +22 lines, -22 lines 0 comments Download
M xfa/fde/css/fde_cssdeclaration.cpp View 15 chunks +17 lines, -16 lines 0 comments Download
M xfa/fde/css/fde_cssstyleselector.cpp View 3 chunks +4 lines, -8 lines 0 comments Download
M xfa/fde/css/fde_cssstylesheet.h View 1 2 3 4 5 6 7 8 2 chunks +4 lines, -3 lines 0 comments Download
M xfa/fde/css/fde_cssstylesheet.cpp View 1 2 3 4 5 6 7 8 7 chunks +9 lines, -7 lines 0 comments Download
M xfa/fgas/crt/fgas_codepage.cpp View 1 chunk +3 lines, -3 lines 0 comments Download
M xfa/fgas/font/fgas_fontutils.cpp View 1 chunk +1 line, -1 line 0 comments Download
M xfa/fgas/font/fgas_stdfontmgr.cpp View 1 2 3 4 5 6 7 8 8 chunks +9 lines, -10 lines 0 comments Download
M xfa/fgas/localization/fgas_locale.cpp View 3 chunks +5 lines, -6 lines 0 comments Download
M xfa/fxfa/app/xfa_ffbarcode.cpp View 1 chunk +6 lines, -6 lines 0 comments Download
M xfa/fxfa/app/xfa_ffdoc.cpp View 3 chunks +3 lines, -6 lines 0 comments Download
M xfa/fxfa/app/xfa_ffdocview.cpp View 1 chunk +3 lines, -3 lines 0 comments Download
M xfa/fxfa/app/xfa_fontmgr.cpp View 1 2 3 5 chunks +5 lines, -20 lines 0 comments Download
M xfa/fxfa/app/xfa_textlayout.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M xfa/fxfa/app/xfa_textlayout.cpp View 1 2 3 4 5 6 7 8 8 chunks +17 lines, -20 lines 0 comments Download
M xfa/fxfa/fm2js/xfa_fm2jscontext.cpp View 1 2 3 4 5 6 7 8 1 chunk +7 lines, -9 lines 0 comments Download
M xfa/fxfa/fm2js/xfa_lexer.cpp View 1 2 3 4 5 6 7 8 1 chunk +8 lines, -11 lines 0 comments Download
M xfa/fxfa/fm2js/xfa_simpleexpression.cpp View 1 2 3 4 2 chunks +2 lines, -4 lines 0 comments Download
M xfa/fxfa/parser/cxfa_widgetdata.cpp View 1 chunk +1 line, -2 lines 0 comments Download
M xfa/fxfa/parser/xfa_basic_imp.cpp View 9 chunks +35 lines, -36 lines 0 comments Download
M xfa/fxfa/parser/xfa_document_datamerger_imp.cpp View 1 2 3 4 5 6 7 8 2 chunks +33 lines, -37 lines 0 comments Download
M xfa/fxfa/parser/xfa_document_imp.cpp View 3 chunks +3 lines, -7 lines 0 comments Download
M xfa/fxfa/parser/xfa_object_imp.cpp View 1 2 3 4 5 6 7 8 7 chunks +19 lines, -34 lines 0 comments Download
M xfa/fxfa/parser/xfa_script_imp.cpp View 1 chunk +1 line, -2 lines 0 comments Download
M xfa/fxfa/parser/xfa_script_nodehelper.cpp View 1 chunk +1 line, -1 line 0 comments Download
M xfa/fxfa/parser/xfa_script_resolveprocessor.cpp View 4 chunks +5 lines, -7 lines 0 comments Download
M xfa/fxfa/parser/xfa_utils_imp.cpp View 1 chunk +1 line, -2 lines 0 comments Download

Messages

Total messages: 10 (4 generated)
Tom Sepez
Lei, please review.
4 years, 8 months ago (2016-04-22 22:44:32 UTC) #3
Lei Zhang
https://codereview.chromium.org/1919563002/diff/140001/xfa/fde/css/fde_cssstylesheet.h File xfa/fde/css/fde_cssstylesheet.h (right): https://codereview.chromium.org/1919563002/diff/140001/xfa/fde/css/fde_cssstylesheet.h#newcode18 xfa/fde/css/fde_cssstylesheet.h:18: FX_BOOL bIgnoreCase) Also bool, 4 callers in xfa/fde/css/fde_cssstylesheet.cpp. https://codereview.chromium.org/1919563002/diff/140001/xfa/fgas/crt/fgas_codepage.cpp ...
4 years, 8 months ago (2016-04-23 01:33:29 UTC) #4
Tom Sepez
https://codereview.chromium.org/1919563002/diff/140001/xfa/fde/css/fde_cssstylesheet.h File xfa/fde/css/fde_cssstylesheet.h (right): https://codereview.chromium.org/1919563002/diff/140001/xfa/fde/css/fde_cssstylesheet.h#newcode18 xfa/fde/css/fde_cssstylesheet.h:18: FX_BOOL bIgnoreCase) On 2016/04/23 01:33:29, Lei Zhang wrote: > ...
4 years, 8 months ago (2016-04-25 16:50:21 UTC) #5
Lei Zhang
lgtm
4 years, 8 months ago (2016-04-25 17:53:15 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1919563002/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1919563002/160001
4 years, 8 months ago (2016-04-25 18:23:28 UTC) #8
commit-bot: I haz the power
4 years, 8 months ago (2016-04-25 18:23:50 UTC) #10
Message was sent while issue was closed.
Committed patchset #9 (id:160001) as
https://pdfium.googlesource.com/pdfium/+/b6853cfe4fd1ee089dfdd0cb09bbc4063532...

Powered by Google App Engine
This is Rietveld 408576698