Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1433)

Unified Diff: core/fxcrt/fx_basic_wstring.cpp

Issue 2060913003: Make code compile with clang_use_chrome_plugin (part II) (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: rebase Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/fxcrt/fx_basic_util.cpp ('k') | core/fxcrt/fx_bidi.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fxcrt/fx_basic_wstring.cpp
diff --git a/core/fxcrt/fx_basic_wstring.cpp b/core/fxcrt/fx_basic_wstring.cpp
index ba86823fe23fd8ae7472f4b0aa1dc618fc9b1b6d..8837c6bb3b3c854aef47b542b2efbe181a8b8e8e 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()));
« no previous file with comments | « core/fxcrt/fx_basic_util.cpp ('k') | core/fxcrt/fx_bidi.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698