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

Issue 1405253007: Revert "Revert "Cleanup some numeric code."" (Closed)

Created:
5 years, 1 month ago by dsinclair
Modified:
5 years, 1 month ago
Reviewers:
Tom Sepez
CC:
pdfium-reviews_googlegroups.com
Base URL:
https://pdfium.googlesource.com/pdfium.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Revert "Revert "Cleanup some numeric code."" This reverts commit 23d576f0b498bd4f37ef2175916223a2e5ea0324. Cleanup some numeric code. This changes the various comparisons of char >= '0' && char <= '9' and char < '0' || char > '9' to use std::isdigit checks. It also cleans up a handful of hex to digit conversions to call one common method. R=tsepez@chromium.org Committed: https://pdfium.googlesource.com/pdfium/+/e0e922db5fb77df9a5a9cc802096f484ed21da1c

Patch Set 1 #

Patch Set 2 : Fix mac build #

Total comments: 20

Patch Set 3 : Leftover comments from original CL. #

Total comments: 4

Patch Set 4 : Rebase to master #

Patch Set 5 : #

Total comments: 4

Patch Set 6 : Rebase to master #

Patch Set 7 : #

Patch Set 8 : Rebase to master #

Unified diffs Side-by-side diffs Delta from patch set Stats (+273 lines, -345 lines) Patch
M BUILD.gn View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M core/include/fxcrt/fx_ext.h View 1 2 4 chunks +16 lines, -14 lines 0 comments Download
M core/src/fpdfapi/fpdf_font/fpdf_font.cpp View 1 2 3 4 5 4 chunks +13 lines, -38 lines 0 comments Download
M core/src/fpdfapi/fpdf_font/fpdf_font_cid.cpp View 1 2 3 4 5 4 chunks +10 lines, -34 lines 0 comments Download
M core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M core/src/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp View 1 2 3 4 5 5 chunks +24 lines, -40 lines 0 comments Download
M core/src/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp View 1 2 3 4 5 2 chunks +14 lines, -18 lines 0 comments Download
M core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp View 1 2 3 15 chunks +74 lines, -89 lines 0 comments Download
M core/src/fpdfapi/fpdf_parser/fpdf_parser_utility.cpp View 1 2 3 chunks +4 lines, -13 lines 0 comments Download
M core/src/fpdftext/fpdf_text.cpp View 1 chunk +1 line, -3 lines 0 comments Download
M core/src/fpdftext/fpdf_text_int.cpp View 1 chunk +2 lines, -3 lines 0 comments Download
M core/src/fxcodec/codec/fx_codec.cpp View 1 2 6 chunks +26 lines, -22 lines 0 comments Download
M core/src/fxcrt/fx_basic_bstring.cpp View 1 2 3 chunks +5 lines, -4 lines 0 comments Download
M core/src/fxcrt/fx_basic_gcc.cpp View 1 2 3 4 2 chunks +7 lines, -9 lines 0 comments Download
M core/src/fxcrt/fx_basic_util.cpp View 1 2 3 4 4 chunks +11 lines, -9 lines 0 comments Download
M core/src/fxcrt/fx_basic_wstring.cpp View 1 2 3 4 5 6 5 chunks +8 lines, -6 lines 0 comments Download
M core/src/fxcrt/fx_extension.cpp View 1 2 4 chunks +4 lines, -12 lines 0 comments Download
A core/src/fxcrt/fx_extension_unittest.cpp View 1 2 1 chunk +19 lines, -0 lines 0 comments Download
M core/src/fxcrt/fx_xml_parser.cpp View 1 2 3 chunks +5 lines, -4 lines 0 comments Download
M fpdfsdk/src/fsdk_baseannot.cpp View 1 2 3 4 10 chunks +20 lines, -22 lines 0 comments Download
M fpdfsdk/src/javascript/PublicMethods.cpp View 1 2 3 chunks +3 lines, -2 lines 0 comments Download
M fpdfsdk/src/javascript/util.cpp View 1 2 4 chunks +4 lines, -3 lines 0 comments Download
M pdfium.gyp View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 7 (1 generated)
Tom Sepez
https://codereview.chromium.org/1405253007/diff/20001/core/src/fpdfapi/fpdf_font/fpdf_font.cpp File core/src/fpdfapi/fpdf_font/fpdf_font.cpp (right): https://codereview.chromium.org/1405253007/diff/20001/core/src/fpdfapi/fpdf_font/fpdf_font.cpp#newcode512 core/src/fpdfapi/fpdf_font/fpdf_font.cpp:512: static FX_DWORD _StringToCode(const CFX_ByteStringC& str) { test, or test ...
5 years, 1 month ago (2015-10-29 19:28:31 UTC) #2
Tom Sepez
https://codereview.chromium.org/1405253007/diff/40001/core/src/fpdfapi/fpdf_font/fpdf_font.cpp File core/src/fpdfapi/fpdf_font/fpdf_font.cpp (right): https://codereview.chromium.org/1405253007/diff/40001/core/src/fpdfapi/fpdf_font/fpdf_font.cpp#newcode520 core/src/fpdfapi/fpdf_font/fpdf_font.cpp:520: for (int i = 1; i < len && ...
5 years, 1 month ago (2015-10-29 20:44:26 UTC) #3
dsinclair
https://codereview.chromium.org/1405253007/diff/40001/core/src/fpdfapi/fpdf_font/fpdf_font.cpp File core/src/fpdfapi/fpdf_font/fpdf_font.cpp (right): https://codereview.chromium.org/1405253007/diff/40001/core/src/fpdfapi/fpdf_font/fpdf_font.cpp#newcode520 core/src/fpdfapi/fpdf_font/fpdf_font.cpp:520: for (int i = 1; i < len && ...
5 years, 1 month ago (2015-11-02 15:43:37 UTC) #4
Tom Sepez
lgtm https://codereview.chromium.org/1405253007/diff/80001/core/src/fxcrt/fx_basic_wstring.cpp File core/src/fxcrt/fx_basic_wstring.cpp (right): https://codereview.chromium.org/1405253007/diff/80001/core/src/fxcrt/fx_basic_wstring.cpp#newcode770 core/src/fxcrt/fx_basic_wstring.cpp:770: while (*lpsz && std::isdigit(*lpsz)) nit: std::isdigit(0) returns false, ...
5 years, 1 month ago (2015-11-02 17:36:47 UTC) #5
dsinclair
https://codereview.chromium.org/1405253007/diff/20001/core/src/fpdfapi/fpdf_font/fpdf_font.cpp File core/src/fpdfapi/fpdf_font/fpdf_font.cpp (right): https://codereview.chromium.org/1405253007/diff/20001/core/src/fpdfapi/fpdf_font/fpdf_font.cpp#newcode512 core/src/fpdfapi/fpdf_font/fpdf_font.cpp:512: static FX_DWORD _StringToCode(const CFX_ByteStringC& str) { On 2015/10/29 19:28:31, ...
5 years, 1 month ago (2015-11-03 15:59:02 UTC) #6
dsinclair
5 years, 1 month ago (2015-11-03 19:54:38 UTC) #7
Message was sent while issue was closed.
Committed patchset #8 (id:140001) manually as
e0e922db5fb77df9a5a9cc802096f484ed21da1c (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698