From a173900b19e158130df049dd1c31b7494baefffd Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Thu, 29 Jun 2017 21:33:34 -0700 Subject: 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 Reviewed-by: Tom Sepez --- xfa/fxfa/parser/cxfa_localevalue.cpp | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'xfa/fxfa/parser') 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) -- cgit v1.2.3