From 31c7b73b71bd7352f96a82716b5e81d7fa24f37f Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Fri, 19 Feb 2016 10:53:24 -0800 Subject: Remove CFX_{Byte,Wide}String::ConvertFrom(). Use/add CFX_{Byte,Wide}String::FromFoo() instead. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1711893003 . --- xfa/src/fgas/src/crt/fx_system.cpp | 4 ++-- xfa/src/fgas/src/localization/fx_locale.cpp | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'xfa/src/fgas') diff --git a/xfa/src/fgas/src/crt/fx_system.cpp b/xfa/src/fgas/src/crt/fx_system.cpp index b08236bb1d..b11fcd271e 100644 --- a/xfa/src/fgas/src/crt/fx_system.cpp +++ b/xfa/src/fgas/src/crt/fx_system.cpp @@ -86,8 +86,8 @@ FX_FLOAT FX_strtof(const FX_CHAR* pcsStr, int32_t iLength, int32_t* pUsedLen) { if (iLength < 0) { iLength = FXSYS_strlen(pcsStr); } - return FX_wcstof(CFX_WideString::FromLocal(pcsStr, iLength), iLength, - pUsedLen); + return FX_wcstof(CFX_WideString::FromLocal(CFX_ByteString(pcsStr, iLength)), + iLength, pUsedLen); } FX_FLOAT FX_wcstof(const FX_WCHAR* pwsStr, int32_t iLength, int32_t* pUsedLen) { FXSYS_assert(pwsStr != NULL); diff --git a/xfa/src/fgas/src/localization/fx_locale.cpp b/xfa/src/fgas/src/localization/fx_locale.cpp index 4b69a5bbed..072d351a3a 100644 --- a/xfa/src/fgas/src/localization/fx_locale.cpp +++ b/xfa/src/fgas/src/localization/fx_locale.cpp @@ -4828,11 +4828,11 @@ CFX_Decimal::CFX_Decimal(const CFX_WideStringC& strObj) { } m_uFlags = FXMATH_DECIMAL_MAKEFLAGS(negmet && IsNotZero(), scale); } + CFX_Decimal::CFX_Decimal(const CFX_ByteStringC& strObj) { - CFX_WideString wstrObj; - wstrObj.ConvertFrom(strObj); - *this = CFX_Decimal(wstrObj); + *this = CFX_Decimal(CFX_WideString::FromLocal(strObj)); } + CFX_Decimal::operator CFX_WideString() const { CFX_WideString retString; CFX_WideString tmpbuf; -- cgit v1.2.3