From cfd4d57800835011b028435e064f13c29243d6e6 Mon Sep 17 00:00:00 2001 From: tsepez Date: Fri, 8 Apr 2016 14:38:54 -0700 Subject: Make converstion explicit from CFX_ByteString to uint8_t* BUG= Review URL: https://codereview.chromium.org/1868293002 --- core/fxcrt/include/fx_string.h | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'core/fxcrt') diff --git a/core/fxcrt/include/fx_string.h b/core/fxcrt/include/fx_string.h index 5e3cb45fba..0e3160a9d8 100644 --- a/core/fxcrt/include/fx_string.h +++ b/core/fxcrt/include/fx_string.h @@ -180,12 +180,6 @@ class CFX_ByteString { : nullptr; } - // Implicit conversion to uint8_t* -- deprecated. - operator const uint8_t*() const { - return m_pData ? reinterpret_cast(m_pData->m_String) - : nullptr; - } - // Explicit conversion to CFX_ByteStringC. // Note: |this| must outlive the use of the result. CFX_ByteStringC AsStringC() const { @@ -294,7 +288,7 @@ class CFX_ByteString { }; inline CFX_ByteStringC& CFX_ByteStringC::operator=(const CFX_ByteString& src) { - m_Ptr = (const uint8_t*)src; + m_Ptr = src.raw_str(); m_Length = src.GetLength(); return *this; } -- cgit v1.2.3