summaryrefslogtreecommitdiff
path: root/core/fxcrt
diff options
context:
space:
mode:
Diffstat (limited to 'core/fxcrt')
-rw-r--r--core/fxcrt/cfx_bytestring.h4
-rw-r--r--core/fxcrt/cfx_widestring.h4
2 files changed, 8 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);
diff --git a/core/fxcrt/cfx_widestring.h b/core/fxcrt/cfx_widestring.h
index fd3c92a15e..977114816d 100644
--- a/core/fxcrt/cfx_widestring.h
+++ b/core/fxcrt/cfx_widestring.h
@@ -35,6 +35,10 @@ class CFX_WideString {
// NOLINTNEXTLINE(runtime/explicit)
CFX_WideString(const wchar_t* ptr);
+ // No implicit conversions from byte strings.
+ // NOLINTNEXTLINE(runtime/explicit)
+ CFX_WideString(char) = delete;
+
CFX_WideString(const wchar_t* ptr, FX_STRSIZE len);
explicit CFX_WideString(const CFX_WideStringC& str);