summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/cxfa_localevalue.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-03-29 11:02:17 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-03-29 15:21:35 +0000
commit9ad342b60490b9e88896aaf2eb7fb8f7bfa73e5a (patch)
tree2eae047becb4856266e4404f762ce3a122b311b3 /xfa/fxfa/parser/cxfa_localevalue.cpp
parent21362ee6370e6ef0f5a8275af5afde3f127887c9 (diff)
downloadpdfium-chromium/3056.tar.xz
Return values instead of out paramschromium/3056
This CL updates the IFX_Locale code and subclasses to return CFX_WideStrings instead of taking out params. Change-Id: Id03499c68161e809607e73b9d8ec778e24631845 Reviewed-on: https://pdfium-review.googlesource.com/3252 Reviewed-by: Nicolás Peña <npm@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/parser/cxfa_localevalue.cpp')
-rw-r--r--xfa/fxfa/parser/cxfa_localevalue.cpp22
1 files changed, 10 insertions, 12 deletions
diff --git a/xfa/fxfa/parser/cxfa_localevalue.cpp b/xfa/fxfa/parser/cxfa_localevalue.cpp
index 189d7d9605..a5238d2c3f 100644
--- a/xfa/fxfa/parser/cxfa_localevalue.cpp
+++ b/xfa/fxfa/parser/cxfa_localevalue.cpp
@@ -940,28 +940,26 @@ bool CXFA_LocaleValue::ValidateNumericTemp(CFX_WideString& wsNumeric,
}
n++;
}
- if (n == nCount) {
+ if (n == nCount)
return true;
- }
- if (nf == nCountFmt) {
+ if (nf == nCountFmt)
return false;
- }
+
while (nf < nCountFmt && (cf = pFmt[nf]) != L'.') {
ASSERT(cf == L'z' || cf == L'*');
++nf;
}
CFX_WideString wsDecimalSymbol;
- if (pLocale) {
- pLocale->GetNumbericSymbol(FX_LOCALENUMSYMBOL_Decimal, wsDecimalSymbol);
- } else {
+ if (pLocale)
+ wsDecimalSymbol = pLocale->GetNumbericSymbol(FX_LOCALENUMSYMBOL_Decimal);
+ else
wsDecimalSymbol = CFX_WideString(L'.');
- }
- if (pFmt[nf] != L'.') {
+
+ if (pFmt[nf] != L'.')
return false;
- }
- if (wsDecimalSymbol != CFX_WideStringC(c) && c != L'.') {
+ if (wsDecimalSymbol != CFX_WideStringC(c) && c != L'.')
return false;
- }
+
++nf;
++n;
bLimit = true;