diff options
author | Lei Zhang <thestig@chromium.org> | 2017-06-29 21:33:34 -0700 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-06-30 04:45:24 +0000 |
commit | a173900b19e158130df049dd1c31b7494baefffd (patch) | |
tree | 68a10871f738b3dca78a9341138ca5e7680d973b /xfa/fxfa/parser | |
parent | 91e39d2218c1b4e67321f845daf0fdb8d171982b (diff) | |
download | pdfium-a173900b19e158130df049dd1c31b7494baefffd.tar.xz |
Fix nits in a bunch of random XFA files.
- Simplify if (cond) return true; return false; pattern.
- Use size_t in CXFA_FFDocView::RunCalculateRecursive().
Change-Id: I1c426556bc927a118cb062999812ab06bbfcfec7
Reviewed-on: https://pdfium-review.googlesource.com/7130
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'xfa/fxfa/parser')
-rw-r--r-- | xfa/fxfa/parser/cxfa_localevalue.cpp | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/xfa/fxfa/parser/cxfa_localevalue.cpp b/xfa/fxfa/parser/cxfa_localevalue.cpp index 983d1ef72f..5b5c27f1d4 100644 --- a/xfa/fxfa/parser/cxfa_localevalue.cpp +++ b/xfa/fxfa/parser/cxfa_localevalue.cpp @@ -490,16 +490,10 @@ bool CXFA_LocaleValue::ValidateCanonicalDate(const CFX_WideString& wsDate, return false; if (wYear < 1900 || wYear > 2029) return false; - if (wMonth < 1 || wMonth > 12) { - if (wMonth == 0 && nLen == wCountY) - return true; - return false; - } - if (wDay < 1) { - if (wDay == 0 && (nLen == wCountY + wCountM)) - return true; - return false; - } + if (wMonth < 1 || wMonth > 12) + return wMonth == 0 && nLen == wCountY; + if (wDay < 1) + return wDay == 0 && (nLen == wCountY + wCountM); if (wMonth == 2) { if (wYear % 400 == 0 || (wYear % 100 != 0 && wYear % 4 == 0)) { if (wDay > 29) |