summaryrefslogtreecommitdiff
path: root/core/fxcrt/fx_basic_wstring.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2017-02-13 10:26:01 -0800
committerChromium commit bot <commit-bot@chromium.org>2017-02-13 19:00:17 +0000
commitf0b65545313f065790de7f91c02e5dd160753abd (patch)
tree747c55722c6b45a979d5c2894a259396a3189ed7 /core/fxcrt/fx_basic_wstring.cpp
parent5fb0ad8adac5fcbf8c8f1965164f41d11c0af669 (diff)
downloadpdfium-f0b65545313f065790de7f91c02e5dd160753abd.tar.xz
Simplify FX_UTF8Encode variants.chromium/3012
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 <tsepez@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fxcrt/fx_basic_wstring.cpp')
-rw-r--r--core/fxcrt/fx_basic_wstring.cpp4
1 files changed, 1 insertions, 3 deletions
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);