diff options
author | Bo Xu <bo_xu@foxitsoftware.com> | 2014-12-30 16:56:12 -0800 |
---|---|---|
committer | Bo Xu <bo_xu@foxitsoftware.com> | 2014-12-30 16:56:12 -0800 |
commit | 659a56bcbeb12b22708fe979d12b318080d828ba (patch) | |
tree | a2dcf561ef8db60344789adc97dbd690f828825c /core/include/fxcrt/fx_string.h | |
parent | 3fc36e8ba200e0dd6099a1f4d72c463c3e8a1d01 (diff) | |
download | pdfium-659a56bcbeb12b22708fe979d12b318080d828ba.tar.xz |
Get rid of FX_LPCSTR cast.
Follow up on https://codereview.chromium.org/733693003
R=brucedawson@chromium.org, tsepez@chromium.org
Review URL: https://codereview.chromium.org/809993004
Diffstat (limited to 'core/include/fxcrt/fx_string.h')
-rw-r--r-- | core/include/fxcrt/fx_string.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/core/include/fxcrt/fx_string.h b/core/include/fxcrt/fx_string.h index 44c6fc53ff..91032f9d97 100644 --- a/core/include/fxcrt/fx_string.h +++ b/core/include/fxcrt/fx_string.h @@ -184,6 +184,13 @@ public: static CFX_ByteString FromUnicode(const CFX_WideString& str); + // Explicit conversion to raw string + FX_LPCSTR c_str() const + { + return m_pData ? m_pData->m_String : ""; + } + + // Implicit conversion to C-style string -- deprecated operator FX_LPCSTR() const { return m_pData ? m_pData->m_String : ""; |