summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2017-04-24 16:16:49 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-04-25 13:11:17 +0000
commitab1faaa7f81b7dafe03d546341c6a643a58b3678 (patch)
tree76278cedc2e5787b4a5b814cf1150efe3038c435 /xfa/fxfa/parser
parentef002c85521278e3082517297cf60372d7751cb1 (diff)
downloadpdfium-ab1faaa7f81b7dafe03d546341c6a643a58b3678.tar.xz
Use fx_extension.h utilities in more places in xfa/
Change-Id: Id58c313aa446ecfa223e5c8edc095586b62a61fa Reviewed-on: https://pdfium-review.googlesource.com/4455 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/parser')
-rw-r--r--xfa/fxfa/parser/cxfa_widgetdata.cpp16
1 files changed, 2 insertions, 14 deletions
diff --git a/xfa/fxfa/parser/cxfa_widgetdata.cpp b/xfa/fxfa/parser/cxfa_widgetdata.cpp
index 361c48a6bc..f11a668276 100644
--- a/xfa/fxfa/parser/cxfa_widgetdata.cpp
+++ b/xfa/fxfa/parser/cxfa_widgetdata.cpp
@@ -51,24 +51,12 @@ bool SplitDateTime(const CFX_WideString& wsDateTime,
wsDate = wsDateTime.Left(nSplitIndex);
if (!wsDate.IsEmpty()) {
- int32_t iCount = wsDate.GetLength();
- int32_t i = 0;
- for (i = 0; i < iCount; i++) {
- if (wsDate[i] >= '0' && wsDate[i] <= '9')
- break;
- }
- if (i == iCount)
+ if (!std::any_of(wsDate.begin(), wsDate.end(), std::iswdigit))
return false;
}
wsTime = wsDateTime.Right(wsDateTime.GetLength() - nSplitIndex - 1);
if (!wsTime.IsEmpty()) {
- int32_t iCount = wsTime.GetLength();
- int32_t i = 0;
- for (i = 0; i < iCount; i++) {
- if (wsTime[i] >= '0' && wsTime[i] <= '9')
- break;
- }
- if (i == iCount)
+ if (!std::any_of(wsTime.begin(), wsTime.end(), std::iswdigit))
return false;
}
return true;