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

Unified Diff: core/fxcrt/include/fx_string.h

Issue 1887003003: Update comments about string constructors (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 8 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fxcrt/include/fx_string.h
diff --git a/core/fxcrt/include/fx_string.h b/core/fxcrt/include/fx_string.h
index 7024691e35b5f7a576a93909f6dea05f0252ae7d..94df35c8e7f27ca24abfd62a76bc438e953ef114 100644
--- a/core/fxcrt/include/fx_string.h
+++ b/core/fxcrt/include/fx_string.h
@@ -147,6 +147,7 @@ class CFX_ByteString {
CFX_ByteString(const CFX_ByteString& other) : m_pData(other.m_pData) {}
CFX_ByteString(CFX_ByteString&& other) { m_pData.Swap(other.m_pData); }
+ // Deliberately implicit to avoid calling on every string literal.
CFX_ByteString(char ch);
CFX_ByteString(const FX_CHAR* ptr)
: CFX_ByteString(ptr, ptr ? FXSYS_strlen(ptr) : 0) {}
@@ -154,6 +155,7 @@ class CFX_ByteString {
CFX_ByteString(const FX_CHAR* ptr, FX_STRSIZE len);
CFX_ByteString(const uint8_t* ptr, FX_STRSIZE len);
+ // TODO(tsepez): mark constructor as explicit.
CFX_ByteString(const CFX_ByteStringC& bstrc);
CFX_ByteString(const CFX_ByteStringC& bstrc1, const CFX_ByteStringC& bstrc2);
@@ -471,12 +473,14 @@ class CFX_WideString {
CFX_WideString(const CFX_WideString& other) : m_pData(other.m_pData) {}
CFX_WideString(CFX_WideString&& other) { m_pData.Swap(other.m_pData); }
+ // Deliberately implicit to avoid calling on every string literal.
+ CFX_WideString(FX_WCHAR ch);
CFX_WideString(const FX_WCHAR* ptr)
: CFX_WideString(ptr, ptr ? FXSYS_wcslen(ptr) : 0) {}
CFX_WideString(const FX_WCHAR* ptr, FX_STRSIZE len);
- CFX_WideString(FX_WCHAR ch);
+ // TODO(tsepez): mark constructor as explicit.
CFX_WideString(const CFX_WideStringC& str);
CFX_WideString(const CFX_WideStringC& str1, const CFX_WideStringC& str2);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698