From f0b65545313f065790de7f91c02e5dd160753abd Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Mon, 13 Feb 2017 10:26:01 -0800 Subject: Simplify FX_UTF8Encode variants. Doing so reveals places where there are needless copies and conversions. Change-Id: I24a868d40aa63836f4167eaf4541964049df7916 Reviewed-on: https://pdfium-review.googlesource.com/2555 Commit-Queue: Tom Sepez Reviewed-by: dsinclair --- core/fxcrt/fx_basic_wstring.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'core/fxcrt/fx_basic_wstring.cpp') diff --git a/core/fxcrt/fx_basic_wstring.cpp b/core/fxcrt/fx_basic_wstring.cpp index e779621e60..93b9ba7c25 100644 --- a/core/fxcrt/fx_basic_wstring.cpp +++ b/core/fxcrt/fx_basic_wstring.cpp @@ -343,12 +343,10 @@ void CFX_WideString::Concat(const FX_WCHAR* pSrcData, FX_STRSIZE nSrcLen) { m_pData.Swap(pNewData); } -// static CFX_ByteString CFX_WideString::UTF8Encode() const { - return FX_UTF8Encode(*this); + return FX_UTF8Encode(AsStringC()); } -// static CFX_ByteString CFX_WideString::UTF16LE_Encode() const { if (!m_pData) { return CFX_ByteString("\0\0", 2); -- cgit v1.2.3