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

Issue 810223003: Cleanup: Refactor some code into its own function in fpdf_text_int.cpp. (Closed)

Created:
6 years ago by Lei Zhang
Modified:
6 years 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

Cleanup: Refactor some code into its own function in fpdf_text_int.cpp. Also use stdlib algorithms in a few places. R=tsepez@chromium.org Committed: https://pdfium.googlesource.com/pdfium/+/ba2dc4a8111448f509e53fc58616b2dad3e742e9

Patch Set 1 #

Total comments: 10

Patch Set 2 : address comments #

Total comments: 2

Patch Set 3 : dont let counter go negative #

Unified diffs Side-by-side diffs Delta from patch set Stats (+57 lines, -47 lines) Patch
M core/src/fpdftext/fpdf_text_int.cpp View 1 2 7 chunks +57 lines, -47 lines 0 comments Download

Messages

Total messages: 10 (1 generated)
Lei Zhang
6 years ago (2014-12-18 03:37:26 UTC) #2
Tom Sepez
LGTM % comments. https://codereview.chromium.org/810223003/diff/1/core/src/fpdftext/fpdf_text_int.cpp File core/src/fpdftext/fpdf_text_int.cpp (right): https://codereview.chromium.org/810223003/diff/1/core/src/fpdftext/fpdf_text_int.cpp#newcode37 core/src/fpdftext/fpdf_text_int.cpp:37: FX_FLOAT _NormalizeThreshold(FX_FLOAT threshold) Ok, lets just ...
6 years ago (2014-12-18 19:33:36 UTC) #3
Lei Zhang
PTAL and sanity check my indexing. https://codereview.chromium.org/810223003/diff/1/core/src/fpdftext/fpdf_text_int.cpp File core/src/fpdftext/fpdf_text_int.cpp (right): https://codereview.chromium.org/810223003/diff/1/core/src/fpdftext/fpdf_text_int.cpp#newcode37 core/src/fpdftext/fpdf_text_int.cpp:37: FX_FLOAT _NormalizeThreshold(FX_FLOAT threshold) ...
6 years ago (2014-12-18 21:07:10 UTC) #4
Tom Sepez
https://codereview.chromium.org/810223003/diff/20001/core/src/fpdftext/fpdf_text_int.cpp File core/src/fpdftext/fpdf_text_int.cpp (right): https://codereview.chromium.org/810223003/diff/20001/core/src/fpdftext/fpdf_text_int.cpp#newcode1848 core/src/fpdftext/fpdf_text_int.cpp:1848: n > m_TempCharList.GetSize() - count - 1; Hmmm. This ...
6 years ago (2014-12-18 21:24:44 UTC) #5
Lei Zhang
https://codereview.chromium.org/810223003/diff/20001/core/src/fpdftext/fpdf_text_int.cpp File core/src/fpdftext/fpdf_text_int.cpp (right): https://codereview.chromium.org/810223003/diff/20001/core/src/fpdftext/fpdf_text_int.cpp#newcode1848 core/src/fpdftext/fpdf_text_int.cpp:1848: n > m_TempCharList.GetSize() - count - 1; On 2014/12/18 ...
6 years ago (2014-12-18 21:49:03 UTC) #6
Tom Sepez
> Then |n| never underflows. Yep. That's it.
6 years ago (2014-12-18 21:55:52 UTC) #7
Tom Sepez
LGTM++ with that change.
6 years ago (2014-12-18 21:56:46 UTC) #8
Lei Zhang
On 2014/12/18 21:56:46, Tom Sepez wrote: > LGTM++ with that change. Patch set 3.
6 years ago (2014-12-18 22:03:21 UTC) #9
Lei Zhang
6 years ago (2014-12-18 22:03:50 UTC) #10
Message was sent while issue was closed.
Committed patchset #3 (id:40001) manually as
ba2dc4a8111448f509e53fc58616b2dad3e742e9 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698