diff options
Diffstat (limited to 'core/fxcrt/fx_basic_wstring.cpp')
-rw-r--r-- | core/fxcrt/fx_basic_wstring.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/core/fxcrt/fx_basic_wstring.cpp b/core/fxcrt/fx_basic_wstring.cpp index ba86823fe2..8837c6bb3b 100644 --- a/core/fxcrt/fx_basic_wstring.cpp +++ b/core/fxcrt/fx_basic_wstring.cpp @@ -63,6 +63,15 @@ const FX_WCHAR* FX_wcsstr(const FX_WCHAR* haystack, static_assert(sizeof(CFX_WideString) <= sizeof(FX_WCHAR*), "Strings must not require more space than pointers"); +CFX_WideString::CFX_WideString() {} + +CFX_WideString::CFX_WideString(const CFX_WideString& other) + : m_pData(other.m_pData) {} + +CFX_WideString::CFX_WideString(CFX_WideString&& other) { + m_pData.Swap(other.m_pData); +} + CFX_WideString::CFX_WideString(const FX_WCHAR* pStr, FX_STRSIZE nLen) { if (nLen < 0) nLen = pStr ? FXSYS_wcslen(pStr) : 0; @@ -76,6 +85,9 @@ CFX_WideString::CFX_WideString(FX_WCHAR ch) { m_pData->m_String[0] = ch; } +CFX_WideString::CFX_WideString(const FX_WCHAR* ptr) + : CFX_WideString(ptr, ptr ? FXSYS_wcslen(ptr) : 0) {} + CFX_WideString::CFX_WideString(const CFX_WideStringC& stringSrc) { if (!stringSrc.IsEmpty()) { m_pData.Reset(StringData::Create(stringSrc.c_str(), stringSrc.GetLength())); |