Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(336)

Unified Diff: xfa/fxfa/parser/xfa_document_serialize.cpp

Issue 1882043004: Remove implicit cast from CFX_WideString to (const wchar_t*) (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: win error #2 Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « xfa/fxfa/parser/xfa_document_imp.cpp ('k') | xfa/fxfa/parser/xfa_localevalue.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fxfa/parser/xfa_document_serialize.cpp
diff --git a/xfa/fxfa/parser/xfa_document_serialize.cpp b/xfa/fxfa/parser/xfa_document_serialize.cpp
index feaebdd7b75ce226e684f3eebc35ae06da60cbfc..4c826b6e59aa76b9ece8416b2bfd24177ccaee29 100644
--- a/xfa/fxfa/parser/xfa_document_serialize.cpp
+++ b/xfa/fxfa/parser/xfa_document_serialize.cpp
@@ -407,7 +407,7 @@ static void XFA_DataExporter_RegenerateFormFile_Container(
wsOutput += wsAttr;
}
if (!wsOutput.IsEmpty()) {
- pStream->WriteString((const FX_WCHAR*)wsOutput, wsOutput.GetLength());
+ pStream->WriteString(wsOutput.c_str(), wsOutput.GetLength());
}
CXFA_Node* pChildNode = pNode->GetNodeItem(XFA_NODEITEM_FirstChild);
if (pChildNode) {
@@ -436,7 +436,7 @@ void XFA_DataExporter_RegenerateFormFile(CXFA_Node* pNode,
static const FX_WCHAR s_pwChecksum[] = L" checksum=\"";
CFX_WideString wsChecksum = CFX_WideString::FromUTF8(pChecksum);
pStream->WriteString(s_pwChecksum, FXSYS_wcslen(s_pwChecksum));
- pStream->WriteString((const FX_WCHAR*)wsChecksum, wsChecksum.GetLength());
+ pStream->WriteString(wsChecksum.c_str(), wsChecksum.GetLength());
pStream->WriteString(L"\"", 1);
}
pStream->WriteString(L" xmlns=\"", FXSYS_wcslen(L" xmlns=\""));
@@ -450,8 +450,7 @@ void XFA_DataExporter_RegenerateFormFile(CXFA_Node* pNode,
wsVersionNumber = FX_WSTRC(L"2.8");
}
wsVersionNumber += FX_WSTRC(L"/\"\n>");
- pStream->WriteString((const FX_WCHAR*)wsVersionNumber,
- wsVersionNumber.GetLength());
+ pStream->WriteString(wsVersionNumber.c_str(), wsVersionNumber.GetLength());
CXFA_Node* pChildNode = pNode->GetNodeItem(XFA_NODEITEM_FirstChild);
while (pChildNode) {
XFA_DataExporter_RegenerateFormFile_Container(pChildNode, pStream);
« no previous file with comments | « xfa/fxfa/parser/xfa_document_imp.cpp ('k') | xfa/fxfa/parser/xfa_localevalue.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698