Remove implicit cast from CFX_ByteString to (const char*).

BUG=

Review URL: https://codereview.chromium.org/1885973002
diff --git a/core/fpdfapi/fpdf_font/cpdf_font.cpp b/core/fpdfapi/fpdf_font/cpdf_font.cpp
index 7a6043a..3dfaded 100644
--- a/core/fpdfapi/fpdf_font/cpdf_font.cpp
+++ b/core/fpdfapi/fpdf_font/cpdf_font.cpp
@@ -485,7 +485,7 @@
 
   const FX_CHAR* name = nullptr;
   if (pCharNames)
-    name = pCharNames[charcode];
+    name = pCharNames[charcode].c_str();
   if ((!name || name[0] == 0) && iBaseEncoding)
     name = PDF_CharNameFromPredefinedCharSet(iBaseEncoding, charcode);
   return name && name[0] ? name : nullptr;
diff --git a/core/fpdfapi/fpdf_font/cpdf_type3font.cpp b/core/fpdfapi/fpdf_font/cpdf_type3font.cpp
index 92f5102..40fb54f 100644
--- a/core/fpdfapi/fpdf_font/cpdf_type3font.cpp
+++ b/core/fpdfapi/fpdf_font/cpdf_type3font.cpp
@@ -73,7 +73,8 @@
     LoadPDFEncoding(pEncoding, m_BaseEncoding, m_pCharNames, FALSE, FALSE);
     if (m_pCharNames) {
       for (int i = 0; i < 256; i++) {
-        m_Encoding.m_Unicodes[i] = PDF_UnicodeFromAdobeName(m_pCharNames[i]);
+        m_Encoding.m_Unicodes[i] =
+            PDF_UnicodeFromAdobeName(m_pCharNames[i].c_str());
         if (m_Encoding.m_Unicodes[i] == 0) {
           m_Encoding.m_Unicodes[i] = i;
         }
diff --git a/core/fpdfapi/fpdf_font/fpdf_font_cid.cpp b/core/fpdfapi/fpdf_font/fpdf_font_cid.cpp
index da6b8de..f84fa9f 100644
--- a/core/fpdfapi/fpdf_font/fpdf_font_cid.cpp
+++ b/core/fpdfapi/fpdf_font/fpdf_font_cid.cpp
@@ -304,7 +304,7 @@
 CPDF_CMap* CPDF_CMapManager::LoadPredefinedCMap(const CFX_ByteString& name,
                                                 FX_BOOL bPromptCJK) {
   CPDF_CMap* pCMap = new CPDF_CMap;
-  const FX_CHAR* pname = name;
+  const FX_CHAR* pname = name.c_str();
   if (*pname == '/') {
     pname++;
   }
@@ -315,7 +315,7 @@
 void CPDF_CMapManager::ReloadAll() {
   for (const auto& pair : m_CMaps) {
     CPDF_CMap* pCMap = pair.second;
-    pCMap->LoadPredefined(this, pair.first, FALSE);
+    pCMap->LoadPredefined(this, pair.first.c_str(), FALSE);
   }
   for (size_t i = 0; i < FX_ArraySize(m_CID2UnicodeMaps); ++i) {
     if (CPDF_CID2UnicodeMap* pMap = m_CID2UnicodeMaps[i]) {
diff --git a/core/fpdfapi/fpdf_page/cpdf_textobject.cpp b/core/fpdfapi/fpdf_page/cpdf_textobject.cpp
index 444101f..a3fbbad 100644
--- a/core/fpdfapi/fpdf_page/cpdf_textobject.cpp
+++ b/core/fpdfapi/fpdf_page/cpdf_textobject.cpp
@@ -142,7 +142,7 @@
   CPDF_Font* pFont = m_TextState.GetFont();
   m_nChars = 0;
   for (int i = 0; i < nsegs; ++i) {
-    m_nChars += pFont->CountChar(pStrs[i], pStrs[i].GetLength());
+    m_nChars += pFont->CountChar(pStrs[i].c_str(), pStrs[i].GetLength());
   }
   m_nChars += nsegs - 1;
   if (m_nChars > 1) {
@@ -150,8 +150,9 @@
     m_pCharPos = FX_Alloc(FX_FLOAT, m_nChars - 1);
     int index = 0;
     for (int i = 0; i < nsegs; ++i) {
-      const FX_CHAR* segment = pStrs[i];
-      int offset = 0, len = pStrs[i].GetLength();
+      const FX_CHAR* segment = pStrs[i].c_str();
+      int len = pStrs[i].GetLength();
+      int offset = 0;
       while (offset < len) {
         m_pCharCodes[index++] = pFont->GetNextChar(segment, len, offset);
       }
@@ -163,7 +164,7 @@
   } else {
     int offset = 0;
     m_pCharCodes = (uint32_t*)(uintptr_t)pFont->GetNextChar(
-        pStrs[0], pStrs[0].GetLength(), offset);
+        pStrs[0].c_str(), pStrs[0].GetLength(), offset);
   }
 }
 
diff --git a/core/fpdfapi/fpdf_parser/cfdf_document.cpp b/core/fpdfapi/fpdf_parser/cfdf_document.cpp
index 9cbf999..3039c32 100644
--- a/core/fpdfapi/fpdf_parser/cfdf_document.cpp
+++ b/core/fpdfapi/fpdf_parser/cfdf_document.cpp
@@ -53,7 +53,7 @@
     bool bNumber;
     CFX_ByteString word = parser.GetNextWord(&bNumber);
     if (bNumber) {
-      uint32_t objnum = FXSYS_atoui(word);
+      uint32_t objnum = FXSYS_atoui(word.c_str());
       word = parser.GetNextWord(&bNumber);
       if (!bNumber) {
         break;
diff --git a/core/fpdfapi/fpdf_parser/cpdf_data_avail.cpp b/core/fpdfapi/fpdf_parser/cpdf_data_avail.cpp
index e08e913..f210c49 100644
--- a/core/fpdfapi/fpdf_parser/cpdf_data_avail.cpp
+++ b/core/fpdfapi/fpdf_parser/cpdf_data_avail.cpp
@@ -792,7 +792,7 @@
   if (!bIsNumber)
     return nullptr;
 
-  uint32_t parser_objnum = FXSYS_atoui(word);
+  uint32_t parser_objnum = FXSYS_atoui(word.c_str());
   if (objnum && parser_objnum != objnum)
     return nullptr;
 
@@ -800,7 +800,7 @@
   if (!bIsNumber)
     return nullptr;
 
-  uint32_t gennum = FXSYS_atoui(word);
+  uint32_t gennum = FXSYS_atoui(word.c_str());
   if (m_syntaxParser.GetKeyword() != "obj") {
     m_syntaxParser.RestorePos(SavedPos);
     return nullptr;
@@ -849,7 +849,7 @@
   if (!bNumber)
     return FALSE;
 
-  uint32_t objnum = FXSYS_atoui(wordObjNum);
+  uint32_t objnum = FXSYS_atoui(wordObjNum.c_str());
   if (m_pLinearized) {
     m_pLinearized->Release();
     m_pLinearized = nullptr;
@@ -901,7 +901,7 @@
         return FALSE;
       }
 
-      m_dwXRefOffset = (FX_FILESIZE)FXSYS_atoi64(xrefpos_str);
+      m_dwXRefOffset = (FX_FILESIZE)FXSYS_atoi64(xrefpos_str.c_str());
       if (!m_dwXRefOffset || m_dwXRefOffset > m_dwFileLen) {
         m_docStatus = PDF_DATAAVAIL_LOADALLFILE;
         return TRUE;
@@ -943,7 +943,7 @@
     if (!bNumber)
       return -1;
 
-    uint32_t objNum = FXSYS_atoui(objnum);
+    uint32_t objNum = FXSYS_atoui(objnum.c_str());
     CPDF_Object* pObj = m_parser.ParseIndirectObjectAt(nullptr, 0, objNum);
     if (!pObj) {
       m_Pos += m_parser.m_pSyntax->SavePos();
diff --git a/core/fpdfapi/fpdf_parser/cpdf_parser.cpp b/core/fpdfapi/fpdf_parser/cpdf_parser.cpp
index f1816f2..d6531f5 100644
--- a/core/fpdfapi/fpdf_parser/cpdf_parser.cpp
+++ b/core/fpdfapi/fpdf_parser/cpdf_parser.cpp
@@ -202,7 +202,7 @@
     if (!bNumber)
       return FORMAT_ERROR;
 
-    m_LastXRefOffset = (FX_FILESIZE)FXSYS_atoi64(xrefpos_str);
+    m_LastXRefOffset = (FX_FILESIZE)FXSYS_atoi64(xrefpos_str.c_str());
     if (!LoadAllCrossRefV4(m_LastXRefOffset) &&
         !LoadAllCrossRefV5(m_LastXRefOffset)) {
       if (!RebuildCrossRef())
@@ -505,7 +505,7 @@
       break;
     }
 
-    uint32_t start_objnum = FXSYS_atoui(word);
+    uint32_t start_objnum = FXSYS_atoui(word.c_str());
     if (start_objnum >= kMaxObjectNumber)
       return false;
 
@@ -846,7 +846,7 @@
                         CFX_ByteString bsOffset =
                             m_pSyntax->GetNextWord(&bNumber);
                         if (bNumber)
-                          m_LastXRefOffset = FXSYS_atoi(bsOffset);
+                          m_LastXRefOffset = FXSYS_atoi(bsOffset.c_str());
                       }
                       m_pSyntax->RestorePos(dwSavePos);
                     }
@@ -1293,7 +1293,7 @@
     return;
   }
 
-  uint32_t parser_objnum = FXSYS_atoui(word);
+  uint32_t parser_objnum = FXSYS_atoui(word.c_str());
   if (parser_objnum && parser_objnum != objnum) {
     m_pSyntax->RestorePos(SavedPos);
     return;
@@ -1365,7 +1365,7 @@
 
   FX_FILESIZE objOffset = m_pSyntax->SavePos();
   objOffset -= word.GetLength();
-  uint32_t parser_objnum = FXSYS_atoui(word);
+  uint32_t parser_objnum = FXSYS_atoui(word.c_str());
   if (objnum && parser_objnum != objnum) {
     m_pSyntax->RestorePos(SavedPos);
     return nullptr;
@@ -1377,7 +1377,7 @@
     return nullptr;
   }
 
-  uint32_t parser_gennum = FXSYS_atoui(word);
+  uint32_t parser_gennum = FXSYS_atoui(word.c_str());
   if (m_pSyntax->GetKeyword() != "obj") {
     m_pSyntax->RestorePos(SavedPos);
     return nullptr;
@@ -1415,7 +1415,7 @@
     return nullptr;
   }
 
-  uint32_t parser_objnum = FXSYS_atoui(word);
+  uint32_t parser_objnum = FXSYS_atoui(word.c_str());
   if (objnum && parser_objnum != objnum) {
     m_pSyntax->RestorePos(SavedPos);
     return nullptr;
@@ -1427,7 +1427,7 @@
     return nullptr;
   }
 
-  uint32_t gennum = FXSYS_atoui(word);
+  uint32_t gennum = FXSYS_atoui(word.c_str());
   if (m_pSyntax->GetKeyword() != "obj") {
     m_pSyntax->RestorePos(SavedPos);
     return nullptr;
@@ -1477,12 +1477,12 @@
   if (!bIsNumber)
     return FALSE;
 
-  uint32_t objnum = FXSYS_atoui(word);
+  uint32_t objnum = FXSYS_atoui(word.c_str());
   word = m_pSyntax->GetNextWord(&bIsNumber);
   if (!bIsNumber)
     return FALSE;
 
-  uint32_t gennum = FXSYS_atoui(word);
+  uint32_t gennum = FXSYS_atoui(word.c_str());
   if (m_pSyntax->GetKeyword() != "obj") {
     m_pSyntax->RestorePos(SavedPos);
     return FALSE;
diff --git a/core/fpdfapi/fpdf_parser/cpdf_syntax_parser.cpp b/core/fpdfapi/fpdf_parser/cpdf_syntax_parser.cpp
index 0190c6e..16daba1 100644
--- a/core/fpdfapi/fpdf_parser/cpdf_syntax_parser.cpp
+++ b/core/fpdfapi/fpdf_parser/cpdf_syntax_parser.cpp
@@ -394,7 +394,7 @@
     if (bIsNumber) {
       CFX_ByteString nextword2 = GetNextWord(nullptr);
       if (nextword2 == "R") {
-        uint32_t objnum = FXSYS_atoui(word);
+        uint32_t objnum = FXSYS_atoui(word.c_str());
         return new CPDF_Reference(pObjList, objnum);
       }
     }
@@ -518,7 +518,7 @@
     if (bIsNumber) {
       CFX_ByteString nextword2 = GetNextWord(nullptr);
       if (nextword2 == "R")
-        return new CPDF_Reference(pObjList, FXSYS_atoui(word));
+        return new CPDF_Reference(pObjList, FXSYS_atoui(word.c_str()));
     }
     m_Pos = SavedPos;
     return new CPDF_Number(word.AsStringC());
diff --git a/core/fpdfapi/fpdf_parser/fpdf_parser_utility.cpp b/core/fpdfapi/fpdf_parser/fpdf_parser_utility.cpp
index bfd0de4..466ccaf 100644
--- a/core/fpdfapi/fpdf_parser/fpdf_parser_utility.cpp
+++ b/core/fpdfapi/fpdf_parser/fpdf_parser_utility.cpp
@@ -112,7 +112,7 @@
   if (!FXSYS_memchr(orig.c_str(), '#', orig.GetLength())) {
     return orig;
   }
-  return PDF_NameDecode(CFX_ByteStringC(orig));
+  return PDF_NameDecode(orig.AsStringC());
 }
 
 CFX_ByteString PDF_NameEncode(const CFX_ByteString& orig) {
diff --git a/core/fpdfapi/fpdf_render/fpdf_render_text.cpp b/core/fpdfapi/fpdf_render/fpdf_render_text.cpp
index 264abe9..ff8df76 100644
--- a/core/fpdfapi/fpdf_render/fpdf_render_text.cpp
+++ b/core/fpdfapi/fpdf_render/fpdf_render_text.cpp
@@ -637,7 +637,7 @@
                                        FX_ARGB stroke_argb,
                                        const CFX_GraphStateData* pGraphState,
                                        const CPDF_RenderOptions* pOptions) {
-  int nChars = pFont->CountChar(str, str.GetLength());
+  int nChars = pFont->CountChar(str.c_str(), str.GetLength());
   if (nChars == 0) {
     return;
   }
@@ -646,7 +646,7 @@
   uint32_t* pCharCodes;
   FX_FLOAT* pCharPos;
   if (nChars == 1) {
-    charcode = pFont->GetNextChar(str, str.GetLength(), offset);
+    charcode = pFont->GetNextChar(str.c_str(), str.GetLength(), offset);
     pCharCodes = (uint32_t*)(uintptr_t)charcode;
     pCharPos = NULL;
   } else {
@@ -654,7 +654,7 @@
     pCharPos = FX_Alloc(FX_FLOAT, nChars - 1);
     FX_FLOAT cur_pos = 0;
     for (int i = 0; i < nChars; i++) {
-      pCharCodes[i] = pFont->GetNextChar(str, str.GetLength(), offset);
+      pCharCodes[i] = pFont->GetNextChar(str.c_str(), str.GetLength(), offset);
       if (i) {
         pCharPos[i - 1] = cur_pos;
       }
diff --git a/core/fpdfdoc/doc_basic.cpp b/core/fpdfdoc/doc_basic.cpp
index e0b71df..6d6e5c2 100644
--- a/core/fpdfdoc/doc_basic.cpp
+++ b/core/fpdfdoc/doc_basic.cpp
@@ -511,7 +511,7 @@
     }
   }
   bsLbl = bsOrig;
-  int nPage = FXSYS_atoi(bsLbl);
+  int nPage = FXSYS_atoi(bsLbl.c_str());
   if (nPage > 0 && nPage <= nPages) {
     return nPage;
   }
diff --git a/core/fpdfdoc/doc_form.cpp b/core/fpdfdoc/doc_form.cpp
index 207b824..6ca40fd 100644
--- a/core/fpdfdoc/doc_form.cpp
+++ b/core/fpdfdoc/doc_form.cpp
@@ -633,11 +633,11 @@
 }
 int CPDF_InterForm::CompareFieldName(const CFX_ByteString& name1,
                                      const CFX_ByteString& name2) {
-  const FX_CHAR* ptr1 = name1;
-  const FX_CHAR* ptr2 = name2;
   if (name1.GetLength() == name2.GetLength()) {
     return name1 == name2 ? 1 : 0;
   }
+  const FX_CHAR* ptr1 = name1.c_str();
+  const FX_CHAR* ptr2 = name2.c_str();
   int i = 0;
   while (ptr1[i] == ptr2[i]) {
     i++;
diff --git a/core/fpdfdoc/doc_utils.cpp b/core/fpdfdoc/doc_utils.cpp
index 4043538..2df7d97e 100644
--- a/core/fpdfdoc/doc_utils.cpp
+++ b/core/fpdfdoc/doc_utils.cpp
@@ -603,8 +603,8 @@
     csNameTag = pFont->GetBaseFont();
   }
   csNameTag.Remove(' ');
-  csNameTag =
-      CPDF_InterForm::GenerateNewResourceName(pDR, "Font", 4, csNameTag);
+  csNameTag = CPDF_InterForm::GenerateNewResourceName(pDR, "Font", 4,
+                                                      csNameTag.c_str());
   pFonts->SetAtReference(csNameTag.AsStringC(), pDocument,
                          pFont->GetFontDict());
 }
diff --git a/core/fpdftext/fpdf_text_int.cpp b/core/fpdftext/fpdf_text_int.cpp
index 8d8fa4e..a1e3fda 100644
--- a/core/fpdftext/fpdf_text_int.cpp
+++ b/core/fpdftext/fpdf_text_int.cpp
@@ -906,7 +906,7 @@
 
   CFX_ByteString str;
   pFont->AppendChar(str, charCode);
-  if (int w = pFont->GetStringWidth(str, 1))
+  if (int w = pFont->GetStringWidth(str.c_str(), 1))
     return w;
 
   return pFont->GetCharBBox(charCode).Width();
diff --git a/core/fxcrt/fx_basic_bstring.cpp b/core/fxcrt/fx_basic_bstring.cpp
index 23fdcaa..bfa0cbd 100644
--- a/core/fxcrt/fx_basic_bstring.cpp
+++ b/core/fxcrt/fx_basic_bstring.cpp
@@ -921,7 +921,7 @@
 }
 
 uint32_t CFX_ByteString::GetID(FX_STRSIZE start_pos) const {
-  return CFX_ByteStringC(*this).GetID(start_pos);
+  return AsStringC().GetID(start_pos);
 }
 uint32_t CFX_ByteStringC::GetID(FX_STRSIZE start_pos) const {
   if (m_Length == 0) {
diff --git a/core/fxcrt/fx_basic_gcc.cpp b/core/fxcrt/fx_basic_gcc.cpp
index c3afe11..ddbdcd5 100644
--- a/core/fxcrt/fx_basic_gcc.cpp
+++ b/core/fxcrt/fx_basic_gcc.cpp
@@ -133,8 +133,8 @@
 extern "C" {
 #endif
 FXSYS_FILE* FXSYS_wfopen(const FX_WCHAR* filename, const FX_WCHAR* mode) {
-  return FXSYS_fopen(CFX_ByteString::FromUnicode(filename),
-                     CFX_ByteString::FromUnicode(mode));
+  return FXSYS_fopen(CFX_ByteString::FromUnicode(filename).c_str(),
+                     CFX_ByteString::FromUnicode(mode).c_str());
 }
 char* FXSYS_strlwr(char* str) {
   if (!str) {
diff --git a/core/fxcrt/fx_basic_util.cpp b/core/fxcrt/fx_basic_util.cpp
index 4374dec..1cf9665 100644
--- a/core/fxcrt/fx_basic_util.cpp
+++ b/core/fxcrt/fx_basic_util.cpp
@@ -210,9 +210,9 @@
 #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
 #ifndef _WIN32_WCE
   CFindFileDataA* pData = new CFindFileDataA;
-  pData->m_Handle =
-      FindFirstFileExA(CFX_ByteString(path) + "/*.*", FindExInfoStandard,
-                       &pData->m_FindData, FindExSearchNameMatch, NULL, 0);
+  pData->m_Handle = FindFirstFileExA((CFX_ByteString(path) + "/*.*").c_str(),
+                                     FindExInfoStandard, &pData->m_FindData,
+                                     FindExSearchNameMatch, NULL, 0);
 #else
   CFindFileDataW* pData = new CFindFileDataW;
   pData->m_Handle = FindFirstFileW(CFX_WideString::FromLocal(path) + L"/*.*",
@@ -242,7 +242,7 @@
   pData->m_bEnd = FALSE;
   return pData;
 #else
-  DIR* dir = opendir(CFX_ByteString::FromUnicode(path));
+  DIR* dir = opendir(CFX_ByteString::FromUnicode(path).c_str());
   return dir;
 #endif
 }
diff --git a/core/fxcrt/include/fx_string.h b/core/fxcrt/include/fx_string.h
index ef0dfee..4b73551 100644
--- a/core/fxcrt/include/fx_string.h
+++ b/core/fxcrt/include/fx_string.h
@@ -170,9 +170,6 @@
   // Note: Any subsequent modification of |this| will invalidate the result.
   const FX_CHAR* c_str() const { return m_pData ? m_pData->m_String : ""; }
 
-  // Implicit conversion to C-style string -- deprecated.
-  operator const FX_CHAR*() const { return m_pData ? m_pData->m_String : ""; }
-
   // Explicit conversion to uint8_t*.
   // Note: Any subsequent modification of |this| will invalidate the result.
   const uint8_t* raw_str() const {
diff --git a/core/fxge/apple/fx_mac_imp.cpp b/core/fxge/apple/fx_mac_imp.cpp
index aae3f71..82b5078 100644
--- a/core/fxge/apple/fx_mac_imp.cpp
+++ b/core/fxge/apple/fx_mac_imp.cpp
@@ -64,7 +64,7 @@
       break;
     }
   if (iBaseFont < 12) {
-    return GetFont(face);
+    return GetFont(face.c_str());
   }
   auto it = m_FontList.find(face);
   if (it != m_FontList.end())
diff --git a/core/fxge/ge/fx_ge_fontmap.cpp b/core/fxge/ge/fx_ge_fontmap.cpp
index 8f9dad8..194f910 100644
--- a/core/fxge/ge/fx_ge_fontmap.cpp
+++ b/core/fxge/ge/fx_ge_fontmap.cpp
@@ -758,11 +758,11 @@
   }
 
   if (bLocalized) {
-    void* hFont = m_pFontInfo->GetFont(name);
+    void* hFont = m_pFontInfo->GetFont(name.c_str());
     if (!hFont) {
       int iExact;
-      hFont =
-          m_pFontInfo->MapFont(0, 0, FXFONT_DEFAULT_CHARSET, 0, name, iExact);
+      hFont = m_pFontInfo->MapFont(0, 0, FXFONT_DEFAULT_CHARSET, 0,
+                                   name.c_str(), iExact);
       if (!hFont)
         return;
     }
@@ -796,7 +796,7 @@
   LoadInstalledFonts();
   int i;
   for (i = pdfium::CollectionSize<int>(m_InstalledTTFonts) - 1; i >= 0; i--) {
-    CFX_ByteString norm1 = TT_NormalizeName(m_InstalledTTFonts[i]);
+    CFX_ByteString norm1 = TT_NormalizeName(m_InstalledTTFonts[i].c_str());
     if (norm1 == norm_name) {
       break;
     }
@@ -972,7 +972,7 @@
   }
   if (!style.IsEmpty()) {
     int nLen = style.GetLength();
-    const FX_CHAR* pStyle = style;
+    const FX_CHAR* pStyle = style.c_str();
     int i = 0;
     FX_BOOL bFirstItem = TRUE;
     CFX_ByteString buf;
@@ -1045,10 +1045,10 @@
                             PitchFamily);
   }
   family = GetFontFamily(family, nStyle);
-  CFX_ByteString match = MatchInstalledFonts(TT_NormalizeName(family));
+  CFX_ByteString match = MatchInstalledFonts(TT_NormalizeName(family.c_str()));
   if (match.IsEmpty() && family != SubstName &&
       (!bHasComma && (!bHasHypen || (bHasHypen && !bStyleAvail)))) {
-    match = MatchInstalledFonts(TT_NormalizeName(SubstName));
+    match = MatchInstalledFonts(TT_NormalizeName(SubstName.c_str()));
   }
   if (match.IsEmpty() && iBaseFont >= 12) {
     if (!bCJK) {
@@ -1104,7 +1104,7 @@
   }
   iExact = !match.IsEmpty();
   void* hFont = m_pFontInfo->MapFont(weight, bItalic, Charset, PitchFamily,
-                                     family, iExact);
+                                     family.c_str(), iExact);
   if (iExact) {
     pSubstFont->m_SubstFlags |= FXFONT_SUBST_EXACT;
   }
@@ -1123,7 +1123,7 @@
       weight = old_weight;
     }
     if (!match.IsEmpty()) {
-      hFont = m_pFontInfo->GetFont(match);
+      hFont = m_pFontInfo->GetFont(match.c_str());
       if (!hFont) {
         return UseInternalSubst(pSubstFont, iBaseFont, italic_angle, old_weight,
                                 PitchFamily);
@@ -1165,7 +1165,7 @@
         return UseInternalSubst(pSubstFont, iBaseFont, italic_angle, old_weight,
                                 PitchFamily);
       }
-      hFont = m_pFontInfo->GetFont(it->name);
+      hFont = m_pFontInfo->GetFont(it->name.c_str());
     }
   }
   pSubstFont->m_ExtHandle = m_pFontInfo->RetainFont(hFont);
@@ -1381,7 +1381,7 @@
   return TRUE;
 }
 void CFX_FolderFontInfo::ScanPath(const CFX_ByteString& path) {
-  void* handle = FX_OpenFolder(path);
+  void* handle = FX_OpenFolder(path.c_str());
   if (!handle)
     return;
 
@@ -1412,7 +1412,7 @@
 }
 
 void CFX_FolderFontInfo::ScanFile(const CFX_ByteString& path) {
-  FXSYS_FILE* pFile = FXSYS_fopen(path, "rb");
+  FXSYS_FILE* pFile = FXSYS_fopen(path.c_str(), "rb");
   if (!pFile)
     return;
 
@@ -1616,7 +1616,7 @@
   if (!datasize || size < datasize)
     return datasize;
 
-  FXSYS_FILE* pFile = FXSYS_fopen(pFont->m_FilePath, "rb");
+  FXSYS_FILE* pFile = FXSYS_fopen(pFont->m_FilePath.c_str(), "rb");
   if (!pFile)
     return 0;
 
diff --git a/core/fxge/win32/fx_win32_device.cpp b/core/fxge/win32/fx_win32_device.cpp
index 60ae57c..f8057e7 100644
--- a/core/fxge/win32/fx_win32_device.cpp
+++ b/core/fxge/win32/fx_win32_device.cpp
@@ -350,7 +350,7 @@
   }
   HFONT hFont =
       ::CreateFontA(-10, 0, 0, 0, weight, bItalic, 0, 0, charset,
-                    OUT_TT_ONLY_PRECIS, 0, 0, subst_pitch_family, face);
+                    OUT_TT_ONLY_PRECIS, 0, 0, subst_pitch_family, face.c_str());
   char facebuf[100];
   HFONT hOldFont = (HFONT)::SelectObject(m_hDC, hFont);
   ::GetTextFaceA(m_hDC, 100, facebuf);
@@ -393,8 +393,9 @@
       }
       break;
   }
-  hFont = ::CreateFontA(-10, 0, 0, 0, weight, bItalic, 0, 0, charset,
-                        OUT_TT_ONLY_PRECIS, 0, 0, subst_pitch_family, face);
+  hFont =
+      ::CreateFontA(-10, 0, 0, 0, weight, bItalic, 0, 0, charset,
+                    OUT_TT_ONLY_PRECIS, 0, 0, subst_pitch_family, face.c_str());
   return hFont;
 }
 void CFX_Win32FontInfo::DeleteFont(void* hFont) {
diff --git a/core/fxge/win32/fx_win32_gdipext.cpp b/core/fxge/win32/fx_win32_gdipext.cpp
index 4e52a89..15f0972 100644
--- a/core/fxge/win32/fx_win32_gdipext.cpp
+++ b/core/fxge/win32/fx_win32_gdipext.cpp
@@ -686,7 +686,7 @@
   strPlusPath += buf;
   strPlusPath += "\\";
   strPlusPath += "GDIPLUS.DLL";
-  m_hModule = LoadLibraryA(strPlusPath);
+  m_hModule = LoadLibraryA(strPlusPath.c_str());
   if (!m_hModule) {
     return;
   }
diff --git a/fpdfsdk/fpdf_sysfontinfo.cpp b/fpdfsdk/fpdf_sysfontinfo.cpp
index 7fe4b08..d5ee7d1 100644
--- a/fpdfsdk/fpdf_sysfontinfo.cpp
+++ b/fpdfsdk/fpdf_sysfontinfo.cpp
@@ -152,7 +152,7 @@
     return 0;
   if (name.GetLength() >= (long)buf_size)
     return name.GetLength() + 1;
-  FXSYS_strcpy(buffer, name);
+  FXSYS_strcpy(buffer, name.c_str());
   return name.GetLength() + 1;
 }
 
diff --git a/fpdfsdk/fpdfformfill.cpp b/fpdfsdk/fpdfformfill.cpp
index aa8bc9a..9f4e294 100644
--- a/fpdfsdk/fpdfformfill.cpp
+++ b/fpdfsdk/fpdfformfill.cpp
@@ -597,8 +597,7 @@
 
   uint32_t real_size = len < *size ? len : *size;
   if (real_size > 0)
-    FXSYS_memcpy((void*)bsText, (const FX_CHAR*)(*sSuggestWords)[index],
-                 real_size);
+    FXSYS_memcpy((void*)bsText, (*sSuggestWords)[index].c_str(), real_size);
   *size = real_size;
   return TRUE;
 }
diff --git a/fpdfsdk/fpdfppo.cpp b/fpdfsdk/fpdfppo.cpp
index 777310b..300e7ba 100644
--- a/fpdfsdk/fpdfppo.cpp
+++ b/fpdfsdk/fpdfppo.cpp
@@ -191,12 +191,13 @@
   if (!pp)
     return nullptr;
 
-  if (pDict->KeyExist((const char*)nSrctag))
-    return pDict->GetObjectBy((const char*)nSrctag);
+  CFX_ByteStringC sSrcTag = nSrctag.AsStringC();
+  if (pDict->KeyExist(sSrcTag))
+    return pDict->GetObjectBy(sSrcTag);
 
   while (pp) {
-    if (pp->KeyExist((const char*)nSrctag))
-      return pp->GetObjectBy((const char*)nSrctag);
+    if (pp->KeyExist(sSrcTag))
+      return pp->GetObjectBy(sSrcTag);
     if (!pp->KeyExist("Parent"))
       break;
     pp = ToDictionary(pp->GetObjectBy("Parent")->GetDirect());
@@ -223,8 +224,9 @@
         const CFX_ByteString& key = it->first;
         CPDF_Object* pNextObj = it->second;
         ++it;
-        if (!FXSYS_strcmp(key, "Parent") || !FXSYS_strcmp(key, "Prev") ||
-            !FXSYS_strcmp(key, "First")) {
+        if (!FXSYS_strcmp(key.c_str(), "Parent") ||
+            !FXSYS_strcmp(key.c_str(), "Prev") ||
+            !FXSYS_strcmp(key.c_str(), "First")) {
           continue;
         }
         if (pNextObj) {
@@ -290,11 +292,11 @@
   if (CPDF_Dictionary* pDictClone = pClone->AsDictionary()) {
     if (pDictClone->KeyExist("Type")) {
       CFX_ByteString strType = pDictClone->GetStringBy("Type");
-      if (!FXSYS_stricmp(strType, "Pages")) {
+      if (!FXSYS_stricmp(strType.c_str(), "Pages")) {
         pDictClone->Release();
         return 4;
       }
-      if (!FXSYS_stricmp(strType, "Page")) {
+      if (!FXSYS_stricmp(strType.c_str(), "Page")) {
         pDictClone->Release();
         return 0;
       }
@@ -330,12 +332,12 @@
       cbMidRange = rangstring.Mid(nStringFrom, nStringTo - nStringFrom);
       int nMid = cbMidRange.Find('-');
       if (nMid == -1) {
-        long lPageNum = atol(cbMidRange);
+        long lPageNum = atol(cbMidRange.c_str());
         if (lPageNum <= 0 || lPageNum > nCount)
           return FALSE;
         pageArray->push_back((uint16_t)lPageNum);
       } else {
-        int nStartPageNum = atol(cbMidRange.Mid(0, nMid));
+        int nStartPageNum = atol(cbMidRange.Mid(0, nMid).c_str());
         if (nStartPageNum == 0)
           return FALSE;
 
@@ -344,7 +346,7 @@
         if (nEnd == 0)
           return FALSE;
 
-        int nEndPageNum = atol(cbMidRange.Mid(nMid, nEnd));
+        int nEndPageNum = atol(cbMidRange.Mid(nMid, nEnd).c_str());
         if (nStartPageNum < 0 || nStartPageNum > nEndPageNum ||
             nEndPageNum > nCount) {
           return FALSE;
diff --git a/fpdfsdk/fpdfxfa/fpdfxfa_doc.cpp b/fpdfsdk/fpdfxfa/fpdfxfa_doc.cpp
index 7fa258c..53068d3 100644
--- a/fpdfsdk/fpdfxfa/fpdfxfa_doc.cpp
+++ b/fpdfsdk/fpdfxfa/fpdfxfa_doc.cpp
@@ -39,7 +39,6 @@
 
 #ifndef _WIN32
 extern void SetLastError(int err);
-
 extern int GetLastError();
 #endif
 
@@ -655,7 +654,7 @@
   CFX_ByteString content;
   if (fileType == FXFA_SAVEAS_XML) {
     content = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n";
-    fileWrite.WriteBlock((const FX_CHAR*)content, fileWrite.GetSize(),
+    fileWrite.WriteBlock(content.c_str(), fileWrite.GetSize(),
                          content.GetLength());
     CFX_WideStringC data(L"data");
     if (m_pXFADocView->GetDoc()->SavePackage(data, &fileWrite)) {
@@ -698,13 +697,13 @@
       } else {
         if (i == size - 1) {
           CFX_WideString wPath = CFX_WideString::FromUTF16LE(
-              (unsigned short*)(const FX_CHAR*)bs,
+              reinterpret_cast<const unsigned short*>(bs.c_str()),
               bs.GetLength() / sizeof(unsigned short));
           CFX_ByteString bPath = wPath.UTF8Encode();
-          CFX_ByteString szFormat =
+          const char* szFormat =
               "\n<pdf href=\"%s\" xmlns=\"http://ns.adobe.com/xdp/pdf/\"/>";
-          content.Format(szFormat, (char*)(const FX_CHAR*)bPath);
-          fileWrite.WriteBlock((const FX_CHAR*)content, fileWrite.GetSize(),
+          content.Format(szFormat, bPath.c_str());
+          fileWrite.WriteBlock(content.c_str(), fileWrite.GetSize(),
                                content.GetLength());
         }
 
@@ -954,8 +953,8 @@
   if (fileType == FXFA_SAVEAS_XML) {
     CFX_WideString ws;
     ws.FromLocal("data");
-    CFX_ByteString content = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n";
-    fileStream.WriteBlock((const FX_CHAR*)content, 0, content.GetLength());
+    const char* content = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n";
+    fileStream.WriteBlock(content, 0, strlen(content));
     m_pXFADoc->SavePackage(ws.AsStringC(), &fileStream);
   } else if (fileType == FXFA_SAVEAS_XDP) {
     if (flag == 0)
diff --git a/fpdfsdk/fsdk_actionhandler.cpp b/fpdfsdk/fsdk_actionhandler.cpp
index 0bbdbab..912bc40 100644
--- a/fpdfsdk/fsdk_actionhandler.cpp
+++ b/fpdfsdk/fsdk_actionhandler.cpp
@@ -470,7 +470,7 @@
   ASSERT(action.GetDict());
 
   CFX_ByteString csName = action.GetNamedAction();
-  pDocument->GetEnv()->FFI_ExecuteNamedAction(csName);
+  pDocument->GetEnv()->FFI_ExecuteNamedAction(csName.c_str());
 }
 
 void CPDFSDK_ActionHandler::DoAction_SetOCGState(CPDFSDK_Document* pDocument,
diff --git a/fpdfsdk/fsdk_mgr.cpp b/fpdfsdk/fsdk_mgr.cpp
index 3412516..7240fe1 100644
--- a/fpdfsdk/fsdk_mgr.cpp
+++ b/fpdfsdk/fsdk_mgr.cpp
@@ -840,7 +840,8 @@
 #endif  // PDF_ENABLE_XFA
 
 CPDFSDK_Annot* CPDFSDK_PageView::AddAnnot(CPDF_Dictionary* pDict) {
-  return pDict ? AddAnnot(pDict->GetStringBy("Subtype"), pDict) : nullptr;
+  return pDict ? AddAnnot(pDict->GetStringBy("Subtype").c_str(), pDict)
+               : nullptr;
 }
 
 CPDFSDK_Annot* CPDFSDK_PageView::AddAnnot(const FX_CHAR* lpSubType,
diff --git a/fpdfsdk/javascript/PublicMethods.cpp b/fpdfsdk/javascript/PublicMethods.cpp
index 5a694c7..d03f671 100644
--- a/fpdfsdk/javascript/PublicMethods.cpp
+++ b/fpdfsdk/javascript/PublicMethods.cpp
@@ -162,7 +162,7 @@
   }
   CFX_WideString wsStr = val.ToCFXWideString();
   CFX_ByteString t = CFX_ByteString::FromUnicode(wsStr);
-  const char* p = (const char*)t;
+  const char* p = t.c_str();
 
   int ch = ',';
   int nIndex = 0;
@@ -170,8 +170,8 @@
   while (*p) {
     const char* pTemp = strchr(p, ch);
     if (!pTemp) {
-      StrArray.SetElement(nIndex,
-                          CJS_Value(pRuntime, StrTrim(CFX_ByteString(p))));
+      StrArray.SetElement(
+          nIndex, CJS_Value(pRuntime, StrTrim(CFX_ByteString(p)).c_str()));
       break;
     }
 
@@ -179,8 +179,8 @@
     strncpy(pSub, p, pTemp - p);
     *(pSub + (pTemp - p)) = '\0';
 
-    StrArray.SetElement(nIndex,
-                        CJS_Value(pRuntime, StrTrim(CFX_ByteString(pSub))));
+    StrArray.SetElement(
+        nIndex, CJS_Value(pRuntime, StrTrim(CFX_ByteString(pSub)).c_str()));
     delete[] pSub;
 
     nIndex++;
@@ -756,7 +756,7 @@
 
   // for processing decimal places
   strValue.Replace(",", ".");
-  double dValue = atof(strValue);
+  double dValue = atof(strValue.c_str());
   if (iDec > 0)
     dValue += DOUBLE_CORRECT;
 
@@ -1040,7 +1040,7 @@
     iSepStyle = 0;
 
   // for processing decimal places
-  double dValue = atof(strValue);
+  double dValue = atof(strValue.c_str());
   dValue *= 100;
   if (iDec > 0)
     dValue += DOUBLE_CORRECT;
@@ -1778,7 +1778,8 @@
     return FALSE;
   if (pEvent->Value().IsEmpty())
     return TRUE;
-  double dEentValue = atof(CFX_ByteString::FromUnicode(pEvent->Value()));
+  double dEentValue =
+      atof(CFX_ByteString::FromUnicode(pEvent->Value()).c_str());
   FX_BOOL bGreaterThan = params[0].ToBool();
   double dGreaterThan = params[1].ToDouble();
   FX_BOOL bLessThan = params[2].ToBool();
diff --git a/fpdfsdk/javascript/global.cpp b/fpdfsdk/javascript/global.cpp
index d843b60..7242a14 100644
--- a/fpdfsdk/javascript/global.cpp
+++ b/fpdfsdk/javascript/global.cpp
@@ -414,7 +414,7 @@
                                               const CFX_ByteString& sData,
                                               v8::Local<v8::Object> pData,
                                               bool bDefaultPersistent) {
-  if (!propname)
+  if (propname.IsEmpty())
     return FALSE;
 
   auto it = m_mapGlobal.find(propname);
diff --git a/fpdfsdk/pdfwindow/PWL_FontMap.cpp b/fpdfsdk/pdfwindow/PWL_FontMap.cpp
index 42beab7..96ca6ea 100644
--- a/fpdfsdk/pdfwindow/PWL_FontMap.cpp
+++ b/fpdfsdk/pdfwindow/PWL_FontMap.cpp
@@ -306,10 +306,10 @@
   CPDF_Font* pFont = NULL;
 
   if (sFontName == "ZapfDingbats") {
-    pFont = pDoc->AddStandardFont(sFontName, NULL);
+    pFont = pDoc->AddStandardFont(sFontName.c_str(), NULL);
   } else {
     CPDF_FontEncoding fe(PDFFONT_ENCODING_WINANSI);
-    pFont = pDoc->AddStandardFont(sFontName, &fe);
+    pFont = pDoc->AddStandardFont(sFontName.c_str(), &fe);
   }
 
   return pFont;
diff --git a/xfa/fgas/crt/fgas_codepage.cpp b/xfa/fgas/crt/fgas_codepage.cpp
index 57d97db..4734a00 100644
--- a/xfa/fgas/crt/fgas_codepage.cpp
+++ b/xfa/fgas/crt/fgas_codepage.cpp
@@ -339,5 +339,5 @@
     *pBuf++ = (FX_CHAR)*pStr++;
   }
   csStr.ReleaseBuffer(iLength);
-  return FX_GetCodePageFromStringA(csStr, iLength);
+  return FX_GetCodePageFromStringA(csStr.c_str(), iLength);
 }
diff --git a/xfa/fgas/crt/fgas_stream.cpp b/xfa/fgas/crt/fgas_stream.cpp
index 02fa210..1a3b239 100644
--- a/xfa/fgas/crt/fgas_stream.cpp
+++ b/xfa/fgas/crt/fgas_stream.cpp
@@ -420,7 +420,7 @@
     }
   }
 #else
-  CFX_ByteString wsMode;
+  const FX_CHAR* wsMode = "rb";
   if (dwAccess & FX_STREAMACCESS_Write) {
     if (dwAccess & FX_STREAMACCESS_Append) {
       wsMode = "a+b";
@@ -429,18 +429,16 @@
     } else {
       wsMode = "r+b";
     }
-  } else {
-    wsMode = "rb";
   }
   CFX_ByteString szFileName = CFX_ByteString::FromUnicode(pszSrcFileName);
-  m_hFile = FXSYS_fopen(szFileName, wsMode);
+  m_hFile = FXSYS_fopen(szFileName.c_str(), wsMode);
   if (m_hFile == NULL) {
     if (dwAccess & FX_STREAMACCESS_Write) {
       if (dwAccess & FX_STREAMACCESS_Create) {
-        m_hFile = FXSYS_fopen(szFileName, "w+b");
+        m_hFile = FXSYS_fopen(szFileName.c_str(), "w+b");
       }
       if (m_hFile == NULL) {
-        m_hFile = FXSYS_fopen(szFileName, "r+b");
+        m_hFile = FXSYS_fopen(szFileName.c_str(), "r+b");
         if (m_hFile == NULL) {
           return FALSE;
         }
diff --git a/xfa/fgas/font/fgas_stdfontmgr.cpp b/xfa/fgas/font/fgas_stdfontmgr.cpp
index 7dc0272..89087aa 100644
--- a/xfa/fgas/font/fgas_stdfontmgr.cpp
+++ b/xfa/fgas/font/fgas_stdfontmgr.cpp
@@ -491,7 +491,8 @@
     if (m_FolderPaths.GetSize() < 1) {
       return "";
     }
-    pCurHandle = FX_OpenFolder(m_FolderPaths[m_FolderPaths.GetSize() - 1]);
+    pCurHandle =
+        FX_OpenFolder(m_FolderPaths[m_FolderPaths.GetSize() - 1].c_str());
     FX_HandleParentPath hpp;
     hpp.pFileHandle = pCurHandle;
     hpp.bsParentPath = m_FolderPaths[m_FolderPaths.GetSize() - 1];
@@ -525,7 +526,7 @@
       hpp.bsParentPath =
           m_FolderQueue.GetDataPtr(m_FolderQueue.GetSize() - 1)->bsParentPath +
           bsFolderSpearator + bsName;
-      hpp.pFileHandle = FX_OpenFolder(hpp.bsParentPath);
+      hpp.pFileHandle = FX_OpenFolder(hpp.bsParentPath.c_str());
       if (hpp.pFileHandle == NULL) {
         continue;
       }
@@ -701,7 +702,7 @@
   CFX_ByteString bsHash;
   bsHash.Format("%d, %d", wCodePage, dwFontStyles);
   bsHash += CFX_WideString(pszFontFamily).UTF8Encode();
-  uint32_t dwHash = FX_HashCode_String_GetA(bsHash, bsHash.GetLength());
+  uint32_t dwHash = FX_HashCode_String_GetA(bsHash.c_str(), bsHash.GetLength());
 
   CFX_ArrayTemplate<IFX_Font*>* pFonts = nullptr;
   if (m_Hash2Fonts.Lookup(dwHash, pFonts)) {
@@ -758,7 +759,7 @@
   else
     bsHash.Format("%d, %d", wCodePage, dwFontStyles);
   bsHash += CFX_WideString(pszFontFamily).UTF8Encode();
-  uint32_t dwHash = FX_HashCode_String_GetA(bsHash, bsHash.GetLength());
+  uint32_t dwHash = FX_HashCode_String_GetA(bsHash.c_str(), bsHash.GetLength());
   CFX_ArrayTemplate<IFX_Font*>* pFonts = nullptr;
   if (m_Hash2Fonts.Lookup(dwHash, pFonts)) {
     if (!pFonts)
@@ -859,8 +860,7 @@
   CFX_ByteString bsHash;
   bsHash += CFX_WideString(pszFileName).UTF8Encode();
 
-  uint32_t dwHash =
-      FX_HashCode_String_GetA((const FX_CHAR*)bsHash, bsHash.GetLength());
+  uint32_t dwHash = FX_HashCode_String_GetA(bsHash.c_str(), bsHash.GetLength());
   IFX_FileAccess* pFontAccess = nullptr;
   if (!m_Hash2FileAccess.Lookup(dwHash, pFontAccess)) {
     pFontAccess = FX_CreateDefaultFileAccess(pszFileName);
@@ -894,7 +894,7 @@
   if (bWantCache) {
     CFX_ByteString bsHash;
     bsHash.Format("%d, %d", (uintptr_t)pFontAccess, iFaceIndex);
-    dwHash = FX_HashCode_String_GetA(bsHash, bsHash.GetLength());
+    dwHash = FX_HashCode_String_GetA(bsHash.c_str(), bsHash.GetLength());
     if (m_FileAccess2IFXFont.Lookup(dwHash, pFont)) {
       if (pFont) {
         if (pFaceCount)
@@ -1032,8 +1032,9 @@
     IFX_SystemFontInfo* pSystemFontInfo,
     uint32_t index) {
   int iExact = 0;
-  void* hFont = pSystemFontInfo->MapFont(
-      0, 0, FXFONT_DEFAULT_CHARSET, 0, pFontMapper->GetFaceName(index), iExact);
+  void* hFont =
+      pSystemFontInfo->MapFont(0, 0, FXFONT_DEFAULT_CHARSET, 0,
+                               pFontMapper->GetFaceName(index).c_str(), iExact);
   if (!hFont)
     return nullptr;
 
diff --git a/xfa/fxbarcode/oned/BC_OnedCode128Writer.cpp b/xfa/fxbarcode/oned/BC_OnedCode128Writer.cpp
index ac05e78..98ec75a 100644
--- a/xfa/fxbarcode/oned/BC_OnedCode128Writer.cpp
+++ b/xfa/fxbarcode/oned/BC_OnedCode128Writer.cpp
@@ -211,7 +211,7 @@
       patternIndex = (int32_t)ch;
       position++;
     } else {
-      patternIndex = FXSYS_atoi(contents.Mid(position, 2));
+      patternIndex = FXSYS_atoi(contents.Mid(position, 2).c_str());
       if (contents.GetAt(position + 1) < '0' ||
           contents.GetAt(position + 1) > '9') {
         position += 1;
diff --git a/xfa/fxbarcode/oned/BC_OnedEAN13Writer.cpp b/xfa/fxbarcode/oned/BC_OnedEAN13Writer.cpp
index b534602..bdc5e1f 100644
--- a/xfa/fxbarcode/oned/BC_OnedEAN13Writer.cpp
+++ b/xfa/fxbarcode/oned/BC_OnedEAN13Writer.cpp
@@ -66,9 +66,9 @@
   int32_t j = 1;
   for (int32_t i = contents.GetLength() - 1; i >= 0; i--) {
     if (j % 2) {
-      odd += FXSYS_atoi(contents.Mid(i, 1));
+      odd += FXSYS_atoi(contents.Mid(i, 1).c_str());
     } else {
-      even += FXSYS_atoi(contents.Mid(i, 1));
+      even += FXSYS_atoi(contents.Mid(i, 1).c_str());
     }
     j++;
   }
@@ -107,7 +107,7 @@
     return NULL;
   }
   m_iDataLenth = 13;
-  int32_t firstDigit = FXSYS_atoi(contents.Mid(0, 1));
+  int32_t firstDigit = FXSYS_atoi(contents.Mid(0, 1).c_str());
   int32_t parities = CBC_OnedEAN13Reader::FIRST_DIGIT_ENCODINGS[firstDigit];
   outLength = m_codeWidth;
   uint8_t* result = FX_Alloc(uint8_t, m_codeWidth);
@@ -120,7 +120,7 @@
   }
   int32_t i = 0;
   for (i = 1; i <= 6; i++) {
-    int32_t digit = FXSYS_atoi(contents.Mid(i, 1));
+    int32_t digit = FXSYS_atoi(contents.Mid(i, 1).c_str());
     if ((parities >> (6 - i) & 1) == 1) {
       digit += 10;
     }
@@ -137,7 +137,7 @@
     return NULL;
   }
   for (i = 7; i <= 12; i++) {
-    int32_t digit = FXSYS_atoi(contents.Mid(i, 1));
+    int32_t digit = FXSYS_atoi(contents.Mid(i, 1).c_str());
     pos += AppendPattern(result, pos, CBC_OneDimReader::L_PATTERNS[digit], 4, 1,
                          e);
     if (e != BCExceptionNO) {
diff --git a/xfa/fxbarcode/oned/BC_OnedEAN8Writer.cpp b/xfa/fxbarcode/oned/BC_OnedEAN8Writer.cpp
index 5336867..4427cb8 100644
--- a/xfa/fxbarcode/oned/BC_OnedEAN8Writer.cpp
+++ b/xfa/fxbarcode/oned/BC_OnedEAN8Writer.cpp
@@ -76,9 +76,9 @@
   int32_t j = 1;
   for (int32_t i = contents.GetLength() - 1; i >= 0; i--) {
     if (j % 2) {
-      odd += FXSYS_atoi(contents.Mid(i, 1));
+      odd += FXSYS_atoi(contents.Mid(i, 1).c_str());
     } else {
-      even += FXSYS_atoi(contents.Mid(i, 1));
+      even += FXSYS_atoi(contents.Mid(i, 1).c_str());
     }
     j++;
   }
@@ -128,7 +128,7 @@
   }
   int32_t i = 0;
   for (i = 0; i <= 3; i++) {
-    int32_t digit = FXSYS_atoi(contents.Mid(i, 1));
+    int32_t digit = FXSYS_atoi(contents.Mid(i, 1).c_str());
     pos += AppendPattern(result, pos, CBC_OneDimReader::L_PATTERNS[digit], 4, 0,
                          e);
     if (e != BCExceptionNO) {
@@ -142,7 +142,7 @@
     return NULL;
   }
   for (i = 4; i <= 7; i++) {
-    int32_t digit = FXSYS_atoi(contents.Mid(i, 1));
+    int32_t digit = FXSYS_atoi(contents.Mid(i, 1).c_str());
     pos += AppendPattern(result, pos, CBC_OneDimReader::L_PATTERNS[digit], 4, 1,
                          e);
     if (e != BCExceptionNO) {
diff --git a/xfa/fxbarcode/oned/BC_OnedUPCAWriter.cpp b/xfa/fxbarcode/oned/BC_OnedUPCAWriter.cpp
index 21ccafc..943384d 100644
--- a/xfa/fxbarcode/oned/BC_OnedUPCAWriter.cpp
+++ b/xfa/fxbarcode/oned/BC_OnedUPCAWriter.cpp
@@ -70,9 +70,9 @@
   int32_t j = 1;
   for (int32_t i = contents.GetLength() - 1; i >= 0; i--) {
     if (j % 2) {
-      odd += FXSYS_atoi(contents.Mid(i, 1));
+      odd += FXSYS_atoi(contents.Mid(i, 1).c_str());
     } else {
-      even += FXSYS_atoi(contents.Mid(i, 1));
+      even += FXSYS_atoi(contents.Mid(i, 1).c_str());
     }
     j++;
   }
diff --git a/xfa/fxfa/app/xfa_ffdoc.cpp b/xfa/fxfa/app/xfa_ffdoc.cpp
index 04fe075..c83895c 100644
--- a/xfa/fxfa/app/xfa_ffdoc.cpp
+++ b/xfa/fxfa/app/xfa_ffdoc.cpp
@@ -412,9 +412,8 @@
     if (pCSContext) {
       pCSContext->GetChecksum(bsChecksum);
     }
-    bFlags = pExport->Export(pFile, pNode, 0, bsChecksum.GetLength()
-                                                  ? (const FX_CHAR*)bsChecksum
-                                                  : NULL);
+    bFlags = pExport->Export(
+        pFile, pNode, 0, bsChecksum.GetLength() ? bsChecksum.c_str() : NULL);
   } else {
     bFlags = pExport->Export(pFile);
   }
diff --git a/xfa/fxfa/app/xfa_ffwidget.cpp b/xfa/fxfa/app/xfa_ffwidget.cpp
index f2c8ad7..037e656 100644
--- a/xfa/fxfa/app/xfa_ffwidget.cpp
+++ b/xfa/fxfa/app/xfa_ffwidget.cpp
@@ -991,7 +991,7 @@
       CFX_ByteString bsData = wsImage.UTF8Encode();
       int32_t iLength = bsData.GetLength();
       pImageBuffer = FX_Alloc(uint8_t, iLength);
-      int32_t iRead = XFA_Base64Decode((const FX_CHAR*)bsData, pImageBuffer);
+      int32_t iRead = XFA_Base64Decode(bsData.c_str(), pImageBuffer);
       if (iRead > 0) {
         pImageFileRead = FX_CreateMemoryStream(pImageBuffer, iRead);
       }
diff --git a/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp b/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp
index e687ee5..68d3a37 100644
--- a/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp
+++ b/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp
@@ -3249,9 +3249,9 @@
       FXJSE_HCONTEXT hContext = FXJSE_Context_Create(hruntime);
       FXJSE_HVALUE returnValue = FXJSE_Value_Create(hruntime);
       javaScript = wsJavaScriptBuf.GetWideString();
-      FXJSE_ExecuteScript(hContext,
-                          FX_UTF8Encode(javaScript, javaScript.GetLength()),
-                          returnValue);
+      FXJSE_ExecuteScript(
+          hContext, FX_UTF8Encode(javaScript, javaScript.GetLength()).c_str(),
+          returnValue);
       FXJSE_Value_Set(args.GetReturnValue(), returnValue);
       FXJSE_Value_Release(returnValue);
       FXJSE_Context_Release(hContext);
@@ -3470,7 +3470,7 @@
       FXJSE_Value_SetNull(args.GetReturnValue());
     } else {
       HValueToUTF8String(unitspanValue, unitspanString);
-      const FX_CHAR* pData = unitspanString;
+      const FX_CHAR* pData = unitspanString.c_str();
       if (pData) {
         int32_t u = 0;
         while (*(pData + u) == 0x20 || *(pData + u) == 0x09 ||
@@ -3505,7 +3505,7 @@
           unitValue = GetSimpleHValue(hThis, args, 1);
           CFX_ByteString unitTempString;
           HValueToUTF8String(unitValue, unitTempString);
-          const FX_CHAR* pData = unitTempString;
+          const FX_CHAR* pData = unitTempString.c_str();
           int32_t u = 0;
           while (*(pData + u) == ' ' || *(pData + u) == 0x09 ||
                  *(pData + u) == 0x0B || *(pData + u) == 0x0C ||
@@ -4904,8 +4904,8 @@
         formatStr += CFX_ByteString::FormatInteger(iPrecision);
       }
       formatStr += "f";
-      numberString.Format(formatStr, fNumber);
-      const FX_CHAR* pData = numberString;
+      numberString.Format(formatStr.c_str(), fNumber);
+      const FX_CHAR* pData = numberString.c_str();
       int32_t iLength = numberString.GetLength();
       int32_t u = 0;
       while (u < iLength) {
@@ -6990,7 +6990,7 @@
   } else if (FXJSE_Value_IsUTF8String(hValue)) {
     CFX_ByteString szValue;
     FXJSE_Value_ToUTF8String(hValue, szValue);
-    iValue = FXSYS_atoi(szValue);
+    iValue = FXSYS_atoi(szValue.c_str());
   } else {
     iValue = FXJSE_Value_ToInteger(hValue);
   }
diff --git a/xfa/fxfa/parser/xfa_locale.cpp b/xfa/fxfa/parser/xfa_locale.cpp
index b974939..91ca23e 100644
--- a/xfa/fxfa/parser/xfa_locale.cpp
+++ b/xfa/fxfa/parser/xfa_locale.cpp
@@ -76,8 +76,8 @@
   if (!pElement) {
     return;
   }
-  GetPattern(pElement, CFX_ByteStringC((const FX_CHAR*)bsSymbols,
-                                       bsSymbols.GetLength() - 1),
+  GetPattern(pElement,
+             CFX_ByteStringC(bsSymbols.c_str(), bsSymbols.GetLength() - 1),
              wsName.AsStringC(), wsNumSymbol);
 }
 void CXFA_XMLLocale::GetDateTimeSymbols(CFX_WideString& wsDtSymbol) const {
diff --git a/xfa/fxfa/parser/xfa_object_imp.cpp b/xfa/fxfa/parser/xfa_object_imp.cpp
index 8b8db88..157d7df 100644
--- a/xfa/fxfa/parser/xfa_object_imp.cpp
+++ b/xfa/fxfa/parser/xfa_object_imp.cpp
@@ -1730,7 +1730,7 @@
     if (!(FXJSE_Value_IsNull(hValue) || FXJSE_Value_IsUndefined(hValue))) {
       FXJSE_Value_ToUTF8String(hValue, newValue);
     }
-    int32_t iValue = FXSYS_atoi(newValue);
+    int32_t iValue = FXSYS_atoi(newValue.c_str());
     CFX_WideString wsNewValue = (iValue == 0) ? FX_WSTRC(L"0") : FX_WSTRC(L"1");
     CFX_WideString wsFormatValue(wsNewValue);
     CXFA_WidgetData* pContainerWidgetData = GetContainerWidgetData();
diff --git a/xfa/fxfa/parser/xfa_script_imp.cpp b/xfa/fxfa/parser/xfa_script_imp.cpp
index 71fec27..d92cdc7 100644
--- a/xfa/fxfa/parser/xfa_script_imp.cpp
+++ b/xfa/fxfa/parser/xfa_script_imp.cpp
@@ -101,7 +101,8 @@
   CXFA_Object* pOriginalObject = m_pThisObject;
   m_pThisObject = pThisObject;
   FXJSE_HVALUE pValue = pThisObject ? GetJSValueFromMap(pThisObject) : NULL;
-  FX_BOOL bRet = FXJSE_ExecuteScript(m_hJsContext, btScript, hRetValue, pValue);
+  FX_BOOL bRet =
+      FXJSE_ExecuteScript(m_hJsContext, btScript.c_str(), hRetValue, pValue);
   m_pThisObject = pOriginalObject;
   m_eScriptType = eSaveType;
   return bRet;
@@ -466,7 +467,8 @@
         CreateVariablesContext(pScriptNode, pThisObject);
     CXFA_Object* pOriginalObject = m_pThisObject;
     m_pThisObject = pThisObject;
-    FX_BOOL bRet = FXJSE_ExecuteScript(hVariablesContext, btScript, hRetValue);
+    FX_BOOL bRet =
+        FXJSE_ExecuteScript(hVariablesContext, btScript.c_str(), hRetValue);
     m_pThisObject = pOriginalObject;
     FXJSE_Value_Release(hRetValue);
     return bRet;
diff --git a/xfa/fxjse/class.cpp b/xfa/fxjse/class.cpp
index c93e0bc..29a8077 100644
--- a/xfa/fxjse/class.cpp
+++ b/xfa/fxjse/class.cpp
@@ -241,8 +241,8 @@
     CFX_ByteString szStringVal;
     szStringVal.Format("[object %s]", lpClass->name);
     info.GetReturnValue().Set(v8::String::NewFromUtf8(
-        info.GetIsolate(), (const FX_CHAR*)szStringVal,
-        v8::String::kNormalString, szStringVal.GetLength()));
+        info.GetIsolate(), szStringVal.c_str(), v8::String::kNormalString,
+        szStringVal.GetLength()));
   } else {
     v8::Local<v8::String> local_str =
         info.This()