diff options
author | Lei Zhang <thestig@chromium.org> | 2017-04-25 09:43:52 -0700 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-04-25 16:58:04 +0000 |
commit | d524e4bf80314ade4a6aedf77b8b4adaa96bfcee (patch) | |
tree | 8ced866d27eca1c14c060b1c4b538fbcba2b6179 /core/fxcrt/cfx_bytestring.h | |
parent | 49f8dc5b1afc4f92110bf40b7639ee1138aa7240 (diff) | |
download | pdfium-d524e4bf80314ade4a6aedf77b8b4adaa96bfcee.tar.xz |
Delete some CFX string ctors.
Prevent implicit construction of CFX_WideString from non-wchar_t
variables. Similarly prevent implicit construction of CFX_ByteString
from non-char variables.
Fix up CBC_OnedCodaBarWriter which tries to do the above, and simplify
code there using pdfium::ContainsValue(). Same for CPDF_FileSpec.
Change-Id: I3db7125a68ef3f64c2f235d38e974767cd083dc3
Reviewed-on: https://pdfium-review.googlesource.com/4478
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fxcrt/cfx_bytestring.h')
-rw-r--r-- | core/fxcrt/cfx_bytestring.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/core/fxcrt/cfx_bytestring.h b/core/fxcrt/cfx_bytestring.h index 0ffe92936a..c4d48954ba 100644 --- a/core/fxcrt/cfx_bytestring.h +++ b/core/fxcrt/cfx_bytestring.h @@ -35,6 +35,10 @@ class CFX_ByteString { // NOLINTNEXTLINE(runtime/explicit) CFX_ByteString(const char* ptr); + // No implicit conversions from wide strings. + // NOLINTNEXTLINE(runtime/explicit) + CFX_ByteString(wchar_t) = delete; + CFX_ByteString(const char* ptr, FX_STRSIZE len); CFX_ByteString(const uint8_t* ptr, FX_STRSIZE len); |