Index: core/include/fxcrt/fx_string.h |
diff --git a/core/include/fxcrt/fx_string.h b/core/include/fxcrt/fx_string.h |
index 44c6fc53ff6de008ff3be9f824e8985e19d59f64..cb255b6ab697ad5e432b33f3d24f43cd8aaa9f7b 100644 |
--- a/core/include/fxcrt/fx_string.h |
+++ b/core/include/fxcrt/fx_string.h |
@@ -184,11 +184,19 @@ 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 : ""; |
} |
+ |
Tom Sepez
2014/12/30 22:53:26
nit: extra blank line.
|
operator FX_LPCBYTE() const |
{ |
return m_pData ? (FX_LPCBYTE)m_pData->m_String : NULL; |