From 30152572648cff28747aec081090a59caafb1383 Mon Sep 17 00:00:00 2001 From: Ryan Harrison Date: Wed, 2 Aug 2017 16:57:56 -0400 Subject: Remove unused FromUnicode method A helper method for FromUnicode existed that converted wchar_t* to CFX_WideString before calling the remaining FromUnicode. This method is not used in the code base, so it has been removed. This simplifies converting FX_STRSIZE to be unsigned, since one of parameters to this method was of type FX_STRSIZE. BUG=pdfium:828 Change-Id: I3da677b84ac3b82ba48497e26d2ac80dd14302e6 Reviewed-on: https://pdfium-review.googlesource.com/9910 Reviewed-by: Tom Sepez Commit-Queue: Ryan Harrison --- core/fxcrt/cfx_bytestring.cpp | 6 ------ core/fxcrt/cfx_bytestring.h | 1 - 2 files changed, 7 deletions(-) diff --git a/core/fxcrt/cfx_bytestring.cpp b/core/fxcrt/cfx_bytestring.cpp index 77e0ecd610..f6634fc51d 100644 --- a/core/fxcrt/cfx_bytestring.cpp +++ b/core/fxcrt/cfx_bytestring.cpp @@ -709,12 +709,6 @@ CFX_WideString CFX_ByteString::UTF8Decode() const { return CFX_WideString(decoder.GetResult()); } -// static -CFX_ByteString CFX_ByteString::FromUnicode(const wchar_t* str, FX_STRSIZE len) { - FX_STRSIZE str_len = len >= 0 ? len : FXSYS_wcslen(str); - return FromUnicode(CFX_WideString(str, str_len)); -} - // static CFX_ByteString CFX_ByteString::FromUnicode(const CFX_WideString& str) { return GetByteString(0, str.AsStringC()); diff --git a/core/fxcrt/cfx_bytestring.h b/core/fxcrt/cfx_bytestring.h index 902d28f300..3f96c2f2f6 100644 --- a/core/fxcrt/cfx_bytestring.h +++ b/core/fxcrt/cfx_bytestring.h @@ -52,7 +52,6 @@ class CFX_ByteString { void clear() { m_pData.Reset(); } - static CFX_ByteString FromUnicode(const wchar_t* ptr, FX_STRSIZE len = -1); static CFX_ByteString FromUnicode(const CFX_WideString& str); // Explicit conversion to C-style string. -- cgit v1.2.3