summaryrefslogtreecommitdiff
path: root/core/fxcrt/include
diff options
context:
space:
mode:
Diffstat (limited to 'core/fxcrt/include')
-rw-r--r--core/fxcrt/include/fx_basic.h10
-rw-r--r--core/fxcrt/include/fx_string.h3
2 files changed, 10 insertions, 3 deletions
diff --git a/core/fxcrt/include/fx_basic.h b/core/fxcrt/include/fx_basic.h
index 7437d9567c..48999c4f19 100644
--- a/core/fxcrt/include/fx_basic.h
+++ b/core/fxcrt/include/fx_basic.h
@@ -80,7 +80,15 @@ class CFX_WideTextBuf : public CFX_BinaryBuf {
FX_WCHAR* GetBuffer() const {
return reinterpret_cast<FX_WCHAR*>(m_pBuffer.get());
}
- CFX_WideStringC AsStringC() const;
+
+ CFX_WideStringC AsStringC() const {
+ return CFX_WideStringC(reinterpret_cast<const FX_WCHAR*>(m_pBuffer.get()),
+ m_DataSize / sizeof(FX_WCHAR));
+ }
+ CFX_WideString MakeString() const {
+ return CFX_WideString(reinterpret_cast<const FX_WCHAR*>(m_pBuffer.get()),
+ m_DataSize / sizeof(FX_WCHAR));
+ }
void Delete(int start_index, int count) {
CFX_BinaryBuf::Delete(start_index * sizeof(FX_WCHAR),
diff --git a/core/fxcrt/include/fx_string.h b/core/fxcrt/include/fx_string.h
index 9019522eca..df8afb386f 100644
--- a/core/fxcrt/include/fx_string.h
+++ b/core/fxcrt/include/fx_string.h
@@ -250,8 +250,7 @@ class CFX_WideString {
CFX_WideString(const FX_WCHAR* ptr, FX_STRSIZE len);
- // TODO(tsepez): mark constructor as explicit.
- CFX_WideString(const CFX_WideStringC& str);
+ explicit CFX_WideString(const CFX_WideStringC& str);
CFX_WideString(const CFX_WideStringC& str1, const CFX_WideStringC& str2);
~CFX_WideString();