summaryrefslogtreecommitdiff
path: root/core/include/fxcrt
diff options
context:
space:
mode:
authorBo Xu <bo_xu@foxitsoftware.com>2014-12-30 16:56:12 -0800
committerBo Xu <bo_xu@foxitsoftware.com>2014-12-30 17:07:17 -0800
commitc616483e834b791b92b0c0d4f99d0ea3b66f1a4f (patch)
treee9589ee48c4aeb5e0ab5e9ba0766e6d8c1f768dd /core/include/fxcrt
parentbb1405dda43fd4b605fd9c2808dc0ead87f54ccc (diff)
downloadpdfium-c616483e834b791b92b0c0d4f99d0ea3b66f1a4f.tar.xz
XFA: merge patch from CL 733693003, get rid of FX_LPCSTR cast
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')
-rw-r--r--core/include/fxcrt/fx_string.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/core/include/fxcrt/fx_string.h b/core/include/fxcrt/fx_string.h
index 47e8ecdf1e..d6701e3d44 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 : "";