summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-05-12 15:49:56 -0700
committerCommit bot <commit-bot@chromium.org>2016-05-12 15:49:56 -0700
commitade9465067098d9f94a13f61741cebf4bb8aac47 (patch)
treec405271790456c276662f7f21136223b292e1713
parent39fbb7e1c2282a46d9bd3adfd030916dcb0155ef (diff)
downloadpdfium-ade9465067098d9f94a13f61741cebf4bb8aac47.tar.xz
Fix comment in fx_string.h
Previous CLs have removed or marked explicit the constructors which allowed bad constructs to compile. I now get an error: candidate constructor not viable: expects an l-value for 1st argument when called as indicated in the comment. Review-Url: https://codereview.chromium.org/1975983002
-rw-r--r--core/fxcrt/include/fx_string.h14
1 files changed, 2 insertions, 12 deletions
diff --git a/core/fxcrt/include/fx_string.h b/core/fxcrt/include/fx_string.h
index fbfb91f759..8c1a6174b2 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;