From 98a689f63282cfcae1e70f9a1303e56c3b4ce13e Mon Sep 17 00:00:00 2001 From: thestig Date: Wed, 6 Apr 2016 12:50:33 -0700 Subject: Make static FX_WCHAR arrays more const. Review URL: https://codereview.chromium.org/1867463002 --- xfa/fde/css/fde_cssstylesheet.cpp | 2 +- xfa/fxfa/parser/xfa_document_serialize.cpp | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'xfa') diff --git a/xfa/fde/css/fde_cssstylesheet.cpp b/xfa/fde/css/fde_cssstylesheet.cpp index bc27545dca..3da7cf41d5 100644 --- a/xfa/fde/css/fde_cssstylesheet.cpp +++ b/xfa/fde/css/fde_cssstylesheet.cpp @@ -11,7 +11,7 @@ #include "xfa/fgas/crt/fgas_codepage.h" IFDE_CSSStyleSheet* IFDE_CSSStyleSheet::LoadHTMLStandardStyleSheet() { - static const FX_WCHAR* s_pStyle = + static const FX_WCHAR s_pStyle[] = L"html,address,blockquote,body,dd,div,dl,dt,fieldset,form,frame,frameset," L"h1,h2,h3,h4,h5,h6,noframes,ol,p,ul,center,dir,hr,menu,pre{display:" L"block}" diff --git a/xfa/fxfa/parser/xfa_document_serialize.cpp b/xfa/fxfa/parser/xfa_document_serialize.cpp index 91b8ff129c..f08215aa4c 100644 --- a/xfa/fxfa/parser/xfa_document_serialize.cpp +++ b/xfa/fxfa/parser/xfa_document_serialize.cpp @@ -429,11 +429,11 @@ void XFA_DataExporter_RegenerateFormFile(CXFA_Node* pNode, const FX_CHAR* pChecksum, FX_BOOL bSaveXML) { if (pNode->GetObjectType() == XFA_OBJECTTYPE_ModelNode) { - static const FX_WCHAR* s_pwsTagName = L""; + static const FX_WCHAR s_pwsTagName[] = L""; pStream->WriteString(s_pwsTagName, FXSYS_wcslen(s_pwsTagName)); if (pChecksum) { - static const FX_WCHAR* s_pwChecksum = L" checksum=\""; + 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()); @@ -497,14 +497,14 @@ FX_BOOL CXFA_DataExporter::Export(IFX_Stream* pStream, if (pNode->GetObjectType() == XFA_OBJECTTYPE_ModelNode) { switch (pNode->GetPacketID()) { case XFA_XDPPACKET_XDP: { - static const FX_WCHAR* s_pwsPreamble = + static const FX_WCHAR s_pwsPreamble[] = L""; pStream->WriteString(s_pwsPreamble, FXSYS_wcslen(s_pwsPreamble)); for (CXFA_Node* pChild = pNode->GetNodeItem(XFA_NODEITEM_FirstChild); pChild; pChild = pChild->GetNodeItem(XFA_NODEITEM_NextSibling)) { Export(pStream, pChild, dwFlag, pChecksum); } - static const FX_WCHAR* s_pwsPostamble = L""; + static const FX_WCHAR s_pwsPostamble[] = L""; pStream->WriteString(s_pwsPostamble, FXSYS_wcslen(s_pwsPostamble)); } break; case XFA_XDPPACKET_Datasets: { -- cgit v1.2.3