diff options
author | Lei Zhang <thestig@chromium.org> | 2017-03-10 14:37:14 -0800 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-03-13 19:28:30 +0000 |
commit | 375c2764b56b38cc9326a8f8ef668fbf78234e9a (patch) | |
tree | ee1056ac37b855135c8c5a544d4716c3d1a9c7b1 /xfa/fxfa/parser/xfa_utils.cpp | |
parent | 723987910fb195e454aab28e1088df4f9ccf0d6e (diff) | |
download | pdfium-375c2764b56b38cc9326a8f8ef668fbf78234e9a.tar.xz |
Make most PDFium code pass Clang plugin's auto raw check.
Change-Id: I9dc32342e24361389841ecba83081a97fc043377
Reviewed-on: https://pdfium-review.googlesource.com/2959
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'xfa/fxfa/parser/xfa_utils.cpp')
-rw-r--r-- | xfa/fxfa/parser/xfa_utils.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/xfa/fxfa/parser/xfa_utils.cpp b/xfa/fxfa/parser/xfa_utils.cpp index 6f54c0e5fe..216c5a56c4 100644 --- a/xfa/fxfa/parser/xfa_utils.cpp +++ b/xfa/fxfa/parser/xfa_utils.cpp @@ -328,10 +328,10 @@ const XFA_PROPERTY* XFA_GetPropertyOfElement(XFA_Element eElement, if (!pProperties || iCount < 1) return nullptr; - auto it = std::find_if(pProperties, pProperties + iCount, - [eProperty](const XFA_PROPERTY& prop) { - return prop.eName == eProperty; - }); + auto* it = std::find_if(pProperties, pProperties + iCount, + [eProperty](const XFA_PROPERTY& prop) { + return prop.eName == eProperty; + }); if (it == pProperties + iCount) return nullptr; @@ -375,10 +375,11 @@ XFA_Element XFA_GetElementTypeForName(const CFX_WideStringC& wsName) { uint32_t uHash = FX_HashCode_GetW(wsName, false); const XFA_ELEMENTINFO* pEnd = g_XFAElementData + g_iXFAElementCount; - auto pInfo = std::lower_bound(g_XFAElementData, pEnd, uHash, - [](const XFA_ELEMENTINFO& info, uint32_t hash) { - return info.uHash < hash; - }); + auto* pInfo = + std::lower_bound(g_XFAElementData, pEnd, uHash, + [](const XFA_ELEMENTINFO& info, uint32_t hash) { + return info.uHash < hash; + }); if (pInfo < pEnd && pInfo->uHash == uHash) return pInfo->eName; return XFA_Element::Unknown; |