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

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

Issue 1975983002: Fix comment in fx_string.h (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 7 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 fbfb91f759620264b485c37756066299ddf25788..8c1a6174b24ececaa3b76cfdd095cc2f853b9a61 100644
--- a/core/fxcrt/include/fx_string.h
+++ b/core/fxcrt/include/fx_string.h
@@ -42,12 +42,7 @@ class CFX_ByteStringC {
}
// Deliberately implicit to avoid calling on every string literal.
- // |ch| must be an lvalue that outlives the the CFX_ByteStringC. However,
- // the use of char rvalues are not caught at compile time. They are
- // implicitly promoted to CFX_ByteString (see below) and then the
- // CFX_ByteStringC is constructed from the CFX_ByteString via the alternate
- // constructor below. The CFX_ByteString then typically goes out of scope
- // and |m_Ptr| may be left pointing to invalid memory. Beware.
+ // |ch| must be an lvalue that outlives the the CFX_ByteStringC.
CFX_ByteStringC(FX_CHAR& ch) {
m_Ptr = (const uint8_t*)&ch;
m_Length = 1;
@@ -364,12 +359,7 @@ class CFX_WideStringC {
}
// Deliberately implicit to avoid calling on every string literal.
- // |ch| must be an lvalue that outlives the the CFX_WideStringC. However,
- // the use of char rvalues are not caught at compile time. They are
- // implicitly promoted to CFX_WideString (see below) and then the
- // CFX_WideStringC is constructed from the CFX_WideString via the alternate
- // constructor below. The CFX_WideString then typically goes out of scope
- // and |m_Ptr| may be left pointing to invalid memory. Beware.
+ // |ch| must be an lvalue that outlives the the CFX_WideStringC.
CFX_WideStringC(FX_WCHAR& ch) {
m_Ptr = &ch;
m_Length = 1;
« 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