summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/fpdfdoc/doc_formfield.cpp3
-rw-r--r--core/fxcrt/extension.h2
-rw-r--r--core/fxcrt/fx_arabic.cpp4
-rw-r--r--core/fxcrt/include/fx_string.h4
4 files changed, 5 insertions, 8 deletions
diff --git a/core/fpdfdoc/doc_formfield.cpp b/core/fpdfdoc/doc_formfield.cpp
index 957352ecef..7f0ff8716b 100644
--- a/core/fpdfdoc/doc_formfield.cpp
+++ b/core/fpdfdoc/doc_formfield.cpp
@@ -724,7 +724,8 @@ int CPDF_FormField::InsertOption(CFX_WideString csOptLabel,
return -1;
}
- CFX_ByteString csStr = PDF_EncodeText(csOptLabel, csOptLabel.GetLength());
+ CFX_ByteString csStr =
+ PDF_EncodeText(csOptLabel.c_str(), csOptLabel.GetLength());
CPDF_Object* pValue = FPDF_GetFieldAttr(m_pDict, "Opt");
CPDF_Array* pOpt = ToArray(pValue);
if (!pOpt) {
diff --git a/core/fxcrt/extension.h b/core/fxcrt/extension.h
index a9f3c23d29..a8a099c664 100644
--- a/core/fxcrt/extension.h
+++ b/core/fxcrt/extension.h
@@ -52,7 +52,7 @@ class CFX_CRTFileAccess : public IFX_FileAccess {
void GetPath(CFX_WideString& wsPath) override { wsPath = m_path; }
IFX_FileStream* CreateFileStream(uint32_t dwModes) override {
- return FX_CreateFileStream(m_path, dwModes);
+ return FX_CreateFileStream(m_path.c_str(), dwModes);
}
FX_BOOL Init(const CFX_WideStringC& wsPath) {
diff --git a/core/fxcrt/fx_arabic.cpp b/core/fxcrt/fx_arabic.cpp
index 803683782d..8c5230731f 100644
--- a/core/fxcrt/fx_arabic.cpp
+++ b/core/fxcrt/fx_arabic.cpp
@@ -221,7 +221,7 @@ void FX_BidiReverseString(CFX_WideString& wsText,
FXSYS_assert(iStart > -1 && iStart < wsText.GetLength());
FXSYS_assert(iCount >= 0 && iStart + iCount <= wsText.GetLength());
FX_WCHAR wch;
- FX_WCHAR* pStart = (FX_WCHAR*)(const FX_WCHAR*)wsText;
+ FX_WCHAR* pStart = const_cast<FX_WCHAR*>(wsText.c_str());
pStart += iStart;
FX_WCHAR* pEnd = pStart + iCount - 1;
while (pStart < pEnd) {
@@ -252,7 +252,7 @@ void FX_BidiClassify(const CFX_WideString& wsText,
FX_BOOL bWS) {
FXSYS_assert(wsText.GetLength() == classes.GetSize());
int32_t iCount = wsText.GetLength();
- const FX_WCHAR* pwsStart = (const FX_WCHAR*)wsText;
+ const FX_WCHAR* pwsStart = wsText.c_str();
FX_WCHAR wch;
int32_t iCls;
if (bWS) {
diff --git a/core/fxcrt/include/fx_string.h b/core/fxcrt/include/fx_string.h
index 4b73551573..9d7d66741b 100644
--- a/core/fxcrt/include/fx_string.h
+++ b/core/fxcrt/include/fx_string.h
@@ -497,10 +497,6 @@ class CFX_WideString {
// Note: Any subsequent modification of |this| will invalidate the result.
const FX_WCHAR* c_str() const { return m_pData ? m_pData->m_String : L""; }
- // Implicit conversion to C-style wide string -- deprecated.
- // Note: Any subsequent modification of |this| will invalidate the result.
- operator const FX_WCHAR*() const { return m_pData ? m_pData->m_String : L""; }
-
// Explicit conversion to CFX_WideStringC.
// Note: Any subsequent modification of |this| will invalidate the result.
CFX_WideStringC AsStringC() const {