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

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

Issue 1919563002: Pass CFX_*StringCs to FX_HashCode_GETA and _GETW hash functions. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: fix issue from c4 Created 4 years, 8 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/fgas/font/fgas_stdfontmgr.cpp ('k') | xfa/fxfa/app/xfa_ffbarcode.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 6e0add1fa58352611787f3c71348e4ffaceda5cc..9a8e05cbc7a067e0ef81115596beb3b790c1c114 100644
--- a/xfa/fgas/localization/fgas_locale.cpp
+++ b/xfa/fgas/localization/fgas_locale.cpp
@@ -595,8 +595,7 @@ FX_LOCALECATEGORY CFX_FormatString::GetCategory(
wsCategory += pStr[ccf];
ccf++;
}
- uint32_t dwHash =
- FX_HashCode_String_GetW(wsCategory.c_str(), wsCategory.GetLength());
+ uint32_t dwHash = FX_HashCode_GetW(wsCategory.AsStringC(), false);
if (dwHash == FX_LOCALECATEGORY_DateHash) {
if (eCategory == FX_LOCALECATEGORY_Time) {
return FX_LOCALECATEGORY_DateTime;
@@ -755,8 +754,8 @@ IFX_Locale* CFX_FormatString::GetNumericFormat(const CFX_WideString& wsPattern,
while (ccf < iLenf && pStr[ccf] != '(' && pStr[ccf] != '{') {
wsSubCategory += pStr[ccf++];
}
- uint32_t dwSubHash = FX_HashCode_String_GetW(
- wsSubCategory.c_str(), wsSubCategory.GetLength());
+ uint32_t dwSubHash =
+ FX_HashCode_GetW(wsSubCategory.AsStringC(), false);
FX_LOCALENUMSUBCATEGORY eSubCategory = FX_LOCALENUMPATTERN_Decimal;
for (int32_t i = 0; i < g_iFXLocaleNumSubCatCount; i++) {
if (g_FXLocaleNumSubCatData[i].uHash == dwSubHash) {
@@ -2209,8 +2208,8 @@ FX_DATETIMETYPE CFX_FormatString::GetDateTimeFormat(
while (ccf < iLenf && pStr[ccf] != '(' && pStr[ccf] != '{') {
wsSubCategory += pStr[ccf++];
}
- uint32_t dwSubHash = FX_HashCode_String_GetW(
- wsSubCategory.c_str(), wsSubCategory.GetLength());
+ uint32_t dwSubHash =
+ FX_HashCode_GetW(wsSubCategory.AsStringC(), false);
FX_LOCALEDATETIMESUBCATEGORY eSubCategory =
FX_LOCALEDATETIMESUBCATEGORY_Medium;
for (int32_t i = 0; i < g_iFXLocaleDateTimeSubCatCount; i++) {
« no previous file with comments | « xfa/fgas/font/fgas_stdfontmgr.cpp ('k') | xfa/fxfa/app/xfa_ffbarcode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698