From 774bdde253b8394aa2ac791e273508ff006d813a Mon Sep 17 00:00:00 2001 From: tsepez Date: Thu, 14 Apr 2016 09:49:44 -0700 Subject: Replace calls to deprecated CFX_{Wide,Byte}String::Empty() Use the more standard name "clear()" instead. Review URL: https://codereview.chromium.org/1888103002 --- xfa/fgas/font/fgas_stdfontmgr.cpp | 2 +- xfa/fgas/localization/fgas_locale.cpp | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'xfa/fgas') diff --git a/xfa/fgas/font/fgas_stdfontmgr.cpp b/xfa/fgas/font/fgas_stdfontmgr.cpp index 6e707bf9cf..9e8c824118 100644 --- a/xfa/fgas/font/fgas_stdfontmgr.cpp +++ b/xfa/fgas/font/fgas_stdfontmgr.cpp @@ -1380,7 +1380,7 @@ void CFX_FontMgrImp::GetNames(const uint8_t* name_table, uint16_t nPlatformID = GetUInt16(lpNameRecord + j * 12 + 0); uint16_t nNameLength = GetUInt16(lpNameRecord + j * 12 + 8); uint16_t nNameOffset = GetUInt16(lpNameRecord + j * 12 + 10); - wsFamily.Empty(); + wsFamily.clear(); if (nPlatformID != 1) { for (uint16_t k = 0; k < nNameLength / 2; k++) { FX_WCHAR wcTemp = GetUInt16(lpStr + nNameOffset + k * 2); diff --git a/xfa/fgas/localization/fgas_locale.cpp b/xfa/fgas/localization/fgas_locale.cpp index dc4b3d220c..6e0add1fa5 100644 --- a/xfa/fgas/localization/fgas_locale.cpp +++ b/xfa/fgas/localization/fgas_locale.cpp @@ -765,7 +765,7 @@ IFX_Locale* CFX_FormatString::GetNumericFormat(const CFX_WideString& wsPattern, break; } } - wsSubCategory.Empty(); + wsSubCategory.clear(); if (!pLocale) { pLocale = m_pLocaleMgr->GetDefLocale(); } @@ -838,7 +838,7 @@ static FX_BOOL FX_GetNumericDotIndex(const CFX_WideString& wsNum, FX_BOOL CFX_FormatString::ParseText(const CFX_WideString& wsSrcText, const CFX_WideString& wsPattern, CFX_WideString& wsValue) { - wsValue.Empty(); + wsValue.clear(); if (wsSrcText.IsEmpty() || wsPattern.IsEmpty()) { return FALSE; } @@ -1663,7 +1663,7 @@ void FX_ParseNumString(const CFX_WideString& wsNum, CFX_WideString& wsResult) { FX_BOOL CFX_FormatString::ParseNum(const CFX_WideString& wsSrcNum, const CFX_WideString& wsPattern, CFX_WideString& wsValue) { - wsValue.Empty(); + wsValue.clear(); if (wsSrcNum.IsEmpty() || wsPattern.IsEmpty()) { return FALSE; } @@ -2242,7 +2242,7 @@ FX_DATETIMETYPE CFX_FormatString::GetDateTimeFormat( default: break; } - wsTempPattern.Empty(); + wsTempPattern.clear(); continue; } ccf++; @@ -2255,7 +2255,7 @@ FX_DATETIMETYPE CFX_FormatString::GetDateTimeFormat( } else if (eCategory == FX_LOCALECATEGORY_Date) { wsDatePattern = wsTempPattern; } - wsTempPattern.Empty(); + wsTempPattern.clear(); } } else { wsTempPattern += pStr[ccf]; @@ -2273,7 +2273,7 @@ FX_DATETIMETYPE CFX_FormatString::GetDateTimeFormat( pLocale = m_pLocaleMgr->GetDefLocale(); } if (!iFindCategory) { - wsTimePattern.Empty(); + wsTimePattern.clear(); wsDatePattern = wsPattern; } return (FX_DATETIMETYPE)iFindCategory; @@ -3123,7 +3123,7 @@ FX_BOOL CFX_FormatString::FormatStrNum(const CFX_WideStringC& wsInputNum, } if (cc >= 0) { int nPos = dot_index % 3; - wsOutput.Empty(); + wsOutput.clear(); for (int32_t i = 0; i < dot_index; i++) { if (i % 3 == nPos && i != 0) { wsOutput += wsGroupSymbol; @@ -3540,7 +3540,7 @@ FX_BOOL CFX_FormatString::FormatLCNumeric(CFX_LCNumeric& lcNum, } if (cc >= 0) { int nPos = dot_index % 3; - wsOutput.Empty(); + wsOutput.clear(); for (int32_t i = 0; i < dot_index; i++) { if (i % 3 == nPos && i != 0) { wsOutput += wsGroupSymbol; @@ -4254,7 +4254,7 @@ FX_BOOL CFX_FormatString::FormatDateTime(const CFX_WideString& wsSrcDateTime, if (eCategory == FX_DATETIMETYPE_Unknown) { if (eDateTimeType == FX_DATETIMETYPE_Time) { wsTimePattern = wsDatePattern; - wsDatePattern.Empty(); + wsDatePattern.clear(); } eCategory = eDateTimeType; } -- cgit v1.2.3