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

Unified Diff: xfa/fgas/localization/fgas_locale.cpp

Issue 1986533002: Fix the code that causes warnings (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 7 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 | « fpdfsdk/fpdfview_embeddertest.cpp ('k') | xfa/fgas/xml/fgas_sax.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fgas/localization/fgas_locale.cpp
diff --git a/xfa/fgas/localization/fgas_locale.cpp b/xfa/fgas/localization/fgas_locale.cpp
index 851b687c4b5eb96255d8ae98e6732f850861839b..bb4fe93ba3f130263d9d39ebf30ac96c4322ae93 100644
--- a/xfa/fgas/localization/fgas_locale.cpp
+++ b/xfa/fgas/localization/fgas_locale.cpp
@@ -2304,12 +2304,12 @@ static FX_BOOL FX_ParseLocaleDate(const CFX_WideString& wsDate,
continue;
}
uint32_t dwSymbolNum = 1;
- uint32_t dwSymbol = strf[ccf++];
- while (ccf < lenf && strf[ccf] == dwSymbol) {
+ FX_WCHAR dwCharSymbol = strf[ccf++];
+ while (ccf < lenf && strf[ccf] == dwCharSymbol) {
ccf++;
dwSymbolNum++;
}
- dwSymbol = (dwSymbol << 8) | (dwSymbolNum + '0');
+ uint32_t dwSymbol = (dwCharSymbol << 8) | (dwSymbolNum + '0');
if (dwSymbol == FXBSTR_ID(0, 0, 'D', '1')) {
if (!FX_IsDigit(str[cc])) {
return FALSE;
@@ -2523,12 +2523,12 @@ static FX_BOOL FX_ParseLocaleTime(const CFX_WideString& wsTime,
continue;
}
uint32_t dwSymbolNum = 1;
- uint32_t dwSymbol = strf[ccf++];
- while (ccf < lenf && strf[ccf] == dwSymbol) {
+ FX_WCHAR dwCharSymbol = strf[ccf++];
+ while (ccf < lenf && strf[ccf] == dwCharSymbol) {
ccf++;
dwSymbolNum++;
}
- dwSymbol = (dwSymbol << 8) | (dwSymbolNum + '0');
+ uint32_t dwSymbol = (dwCharSymbol << 8) | (dwSymbolNum + '0');
if (dwSymbol == FXBSTR_ID(0, 0, 'k', '1') ||
dwSymbol == FXBSTR_ID(0, 0, 'H', '1') ||
dwSymbol == FXBSTR_ID(0, 0, 'h', '1') ||
@@ -3952,12 +3952,12 @@ static FX_BOOL FX_DateFormat(const CFX_WideString& wsDatePattern,
continue;
}
uint32_t dwSymbolNum = 1;
- uint32_t dwSymbol = strf[ccf++];
- while (ccf < lenf && strf[ccf] == dwSymbol) {
+ FX_WCHAR dwCharSymbol = strf[ccf++];
+ while (ccf < lenf && strf[ccf] == dwCharSymbol) {
ccf++;
dwSymbolNum++;
}
- dwSymbol = (dwSymbol << 8) | (dwSymbolNum + '0');
+ uint32_t dwSymbol = (dwCharSymbol << 8) | (dwSymbolNum + '0');
if (dwSymbol == FXBSTR_ID(0, 0, 'D', '1')) {
CFX_WideString wsDay;
wsDay.Format(L"%d", day);
@@ -4079,12 +4079,12 @@ static FX_BOOL FX_TimeFormat(const CFX_WideString& wsTimePattern,
continue;
}
uint32_t dwSymbolNum = 1;
- uint32_t dwSymbol = strf[ccf++];
- while (ccf < lenf && strf[ccf] == dwSymbol) {
+ FX_WCHAR dwCharSymbol = strf[ccf++];
+ while (ccf < lenf && strf[ccf] == dwCharSymbol) {
ccf++;
dwSymbolNum++;
}
- dwSymbol = (dwSymbol << 8) | (dwSymbolNum + '0');
+ uint32_t dwSymbol = (dwCharSymbol << 8) | (dwSymbolNum + '0');
if (dwSymbol == FXBSTR_ID(0, 0, 'h', '1')) {
if (wHour > 12) {
wHour -= 12;
« no previous file with comments | « fpdfsdk/fpdfview_embeddertest.cpp ('k') | xfa/fgas/xml/fgas_sax.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698