diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-11-16 21:45:18 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-11-16 21:45:18 +0000 |
commit | 3f1c832dda209cf6682bb75316c07d71332fe6c3 (patch) | |
tree | 79e274e65a500bc7964fe4328a6185c805274640 /core/fxcrt/xml/cfx_xmldoc.cpp | |
parent | 40d522134a11867adb95f77c0b7891932e0739a2 (diff) | |
download | pdfium-3f1c832dda209cf6682bb75316c07d71332fe6c3.tar.xz |
Make WideString::{Format|FormatV} static
This CL moves the Format and FormatV methods from WideString to be
static.
Bug: pdfium:934
Change-Id: I9941d6a2a5bbf0a82087cd0ea5d0f8fc42eecd3e
Reviewed-on: https://pdfium-review.googlesource.com/18630
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fxcrt/xml/cfx_xmldoc.cpp')
-rw-r--r-- | core/fxcrt/xml/cfx_xmldoc.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/fxcrt/xml/cfx_xmldoc.cpp b/core/fxcrt/xml/cfx_xmldoc.cpp index 30e4a47e72..e29c09a08e 100644 --- a/core/fxcrt/xml/cfx_xmldoc.cpp +++ b/core/fxcrt/xml/cfx_xmldoc.cpp @@ -53,10 +53,9 @@ void CFX_XMLDoc::SaveXMLNode( CFX_XMLNode* pNode = (CFX_XMLNode*)pINode; switch (pNode->GetType()) { case FX_XMLNODE_Instruction: { - WideString ws; CFX_XMLInstruction* pInstruction = (CFX_XMLInstruction*)pNode; if (pInstruction->GetName().CompareNoCase(L"xml") == 0) { - ws = L"<?xml version=\"1.0\" encoding=\""; + WideString ws = L"<?xml version=\"1.0\" encoding=\""; uint16_t wCodePage = pXMLStream->GetCodePage(); if (wCodePage == FX_CODEPAGE_UTF16LE) { ws += L"UTF-16"; @@ -68,7 +67,8 @@ void CFX_XMLDoc::SaveXMLNode( ws += L"\"?>"; pXMLStream->WriteString(ws.AsStringView()); } else { - ws.Format(L"<?%s", pInstruction->GetName().c_str()); + WideString ws = + WideString::Format(L"<?%s", pInstruction->GetName().c_str()); pXMLStream->WriteString(ws.AsStringView()); for (auto it : pInstruction->GetAttributes()) { |