diff options
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/fxcrt/fx_basic_wstring.cpp | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/core/src/fxcrt/fx_basic_wstring.cpp b/core/src/fxcrt/fx_basic_wstring.cpp index 9b27537ed9..3465b4a926 100644 --- a/core/src/fxcrt/fx_basic_wstring.cpp +++ b/core/src/fxcrt/fx_basic_wstring.cpp @@ -63,21 +63,6 @@ CFX_WideString::~CFX_WideString() FX_Free(m_pData); } } -void CFX_WideString::InitStr(FX_LPCWSTR lpsz, FX_STRSIZE nLen) -{ - if (nLen < 0) { - nLen = lpsz ? (FX_STRSIZE)FXSYS_wcslen(lpsz) : 0; - } - if (nLen) { - m_pData = FX_AllocStringW(nLen); - if (!m_pData) { - return; - } - FXSYS_memcpy32(m_pData->m_String, lpsz, nLen * sizeof(FX_WCHAR)); - } else { - m_pData = NULL; - } -} CFX_WideString::CFX_WideString(const CFX_WideString& stringSrc) { if (stringSrc.m_pData == NULL) { @@ -92,6 +77,19 @@ CFX_WideString::CFX_WideString(const CFX_WideString& stringSrc) *this = stringSrc; } } +CFX_WideString::CFX_WideString(FX_LPCWSTR lpsz, FX_STRSIZE nLen) { + if (nLen < 0) { + nLen = lpsz ? (FX_STRSIZE)FXSYS_wcslen(lpsz) : 0; + } + if (nLen) { + m_pData = FX_AllocStringW(nLen); + if (m_pData) { + FXSYS_memcpy32(m_pData->m_String, lpsz, nLen * sizeof(FX_WCHAR)); + } + } else { + m_pData = NULL; + } +} CFX_WideString::CFX_WideString(FX_WCHAR ch) { m_pData = FX_AllocStringW(1); |