summaryrefslogtreecommitdiff
path: root/core/fxcrt/fx_basic_bstring.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fxcrt/fx_basic_bstring.cpp')
-rw-r--r--core/fxcrt/fx_basic_bstring.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/core/fxcrt/fx_basic_bstring.cpp b/core/fxcrt/fx_basic_bstring.cpp
index 379f1ee882..d0ba1af5ba 100644
--- a/core/fxcrt/fx_basic_bstring.cpp
+++ b/core/fxcrt/fx_basic_bstring.cpp
@@ -94,11 +94,23 @@ CFX_ByteString::CFX_ByteString(const uint8_t* pStr, FX_STRSIZE nLen) {
}
}
+CFX_ByteString::CFX_ByteString() {}
+
+CFX_ByteString::CFX_ByteString(const CFX_ByteString& other)
+ : m_pData(other.m_pData) {}
+
+CFX_ByteString::CFX_ByteString(CFX_ByteString&& other) {
+ m_pData.Swap(other.m_pData);
+}
+
CFX_ByteString::CFX_ByteString(char ch) {
m_pData.Reset(StringData::Create(1));
m_pData->m_String[0] = ch;
}
+CFX_ByteString::CFX_ByteString(const FX_CHAR* ptr)
+ : CFX_ByteString(ptr, ptr ? FXSYS_strlen(ptr) : 0) {}
+
CFX_ByteString::CFX_ByteString(const CFX_ByteStringC& stringSrc) {
if (!stringSrc.IsEmpty())
m_pData.Reset(StringData::Create(stringSrc.c_str(), stringSrc.GetLength()));