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

Issue 2107093004: Convert some methods to std::lower_bound and std::find_if. (Closed)

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

Description

Convert some methods to std::lower_bound and std::find_if. This CL updates XFA_GetElementTypeForName() to use std::lower_bound instead of a custom binary search implementation to find the element info. XFA_GetPropertyOfElement() is changed to use std::find_if. Previously it was using a custom binary search implementation. Changing this to non-binary search will allow having the items in g_XFAElementPropertyData be out of XFA_Element order. There are at most 19 items that need to be searched and often 1 or 2. Committed: https://pdfium.googlesource.com/pdfium/+/d5fd8e4aa5041b2402b703d824d8736bd5407231

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+22 lines, -32 lines) Patch
M xfa/fxfa/parser/xfa_basic_imp.cpp View 2 chunks +22 lines, -32 lines 1 comment Download

Messages

Total messages: 9 (5 generated)
dsinclair
https://codereview.chromium.org/2107093004/diff/1/xfa/fxfa/parser/xfa_basic_imp.cpp File xfa/fxfa/parser/xfa_basic_imp.cpp (right): https://codereview.chromium.org/2107093004/diff/1/xfa/fxfa/parser/xfa_basic_imp.cpp#newcode246 xfa/fxfa/parser/xfa_basic_imp.cpp:246: auto it = std::find_if(pProperties, pProperties + iCount, I'm looking ...
4 years, 5 months ago (2016-06-30 03:40:16 UTC) #3
Lei Zhang
lgtm
4 years, 5 months ago (2016-06-30 22:41:48 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2107093004/1
4 years, 5 months ago (2016-07-01 02:55:16 UTC) #7
commit-bot: I haz the power
4 years, 5 months ago (2016-07-01 02:55:43 UTC) #9
Message was sent while issue was closed.
Committed patchset #1 (id:1) as
https://pdfium.googlesource.com/pdfium/+/d5fd8e4aa5041b2402b703d824d8736bd540...

Powered by Google App Engine
This is Rietveld 408576698