Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(221)

Unified Diff: xfa/fxfa/parser/xfa_localevalue.cpp

Issue 1821043003: Remove FX_WORD in favor of uint16_t. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Use stdint.h directly, bitfield minefield. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « xfa/fxfa/parser/xfa_localemgr.cpp ('k') | xfa/fxfa/parser/xfa_object.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fxfa/parser/xfa_localevalue.cpp
diff --git a/xfa/fxfa/parser/xfa_localevalue.cpp b/xfa/fxfa/parser/xfa_localevalue.cpp
index 8b3efa59511053440639b3ee5bf4317e9d0146a9..b7ee9d48ad81aa09c4601fe71146dce8a42332e5 100644
--- a/xfa/fxfa/parser/xfa_localevalue.cpp
+++ b/xfa/fxfa/parser/xfa_localevalue.cpp
@@ -591,16 +591,16 @@ FX_BOOL CXFA_LocaleValue::ValidateCanonicalValue(const CFX_WideString& wsValue,
}
FX_BOOL CXFA_LocaleValue::ValidateCanonicalDate(const CFX_WideString& wsDate,
CFX_Unitime& unDate) {
- const FX_WORD LastDay[12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
- const FX_WORD wCountY = 4, wCountM = 2, wCountD = 2;
+ const uint16_t LastDay[12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
+ const uint16_t wCountY = 4, wCountM = 2, wCountD = 2;
int nLen = wsDate.GetLength();
if (nLen < wCountY || nLen > wCountY + wCountM + wCountD + 2) {
return FALSE;
}
const bool bSymbol = wsDate.Find(0x2D) != -1;
- FX_WORD wYear = 0;
- FX_WORD wMonth = 0;
- FX_WORD wDay = 0;
+ uint16_t wYear = 0;
+ uint16_t wMonth = 0;
+ uint16_t wDay = 0;
const FX_WCHAR* pDate = (const FX_WCHAR*)wsDate;
int nIndex = 0, nStart = 0;
while (pDate[nIndex] != '\0' && nIndex < wCountY) {
@@ -678,15 +678,15 @@ FX_BOOL CXFA_LocaleValue::ValidateCanonicalTime(const CFX_WideString& wsTime) {
int nLen = wsTime.GetLength();
if (nLen < 2)
return FALSE;
- const FX_WORD wCountH = 2;
- const FX_WORD wCountM = 2;
- const FX_WORD wCountS = 2;
- const FX_WORD wCountF = 3;
+ const uint16_t wCountH = 2;
+ const uint16_t wCountM = 2;
+ const uint16_t wCountS = 2;
+ const uint16_t wCountF = 3;
const bool bSymbol = wsTime.Find(':') != -1;
- FX_WORD wHour = 0;
- FX_WORD wMinute = 0;
- FX_WORD wSecond = 0;
- FX_WORD wFraction = 0;
+ uint16_t wHour = 0;
+ uint16_t wMinute = 0;
+ uint16_t wSecond = 0;
+ uint16_t wFraction = 0;
const FX_WCHAR* pTime = (const FX_WCHAR*)wsTime;
int nIndex = 0;
int nStart = 0;
« no previous file with comments | « xfa/fxfa/parser/xfa_localemgr.cpp ('k') | xfa/fxfa/parser/xfa_object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698