summaryrefslogtreecommitdiff
path: root/xfa
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-11-16 22:08:07 +0000
committerChromium commit bot <commit-bot@chromium.org>2017-11-16 22:08:07 +0000
commit1c4735aed9442a8e442214a23a3df94bd8fc99b5 (patch)
tree37264efcc3a1d90e3a9f05384d283923c828242f /xfa
parent3f1c832dda209cf6682bb75316c07d71332fe6c3 (diff)
downloadpdfium-1c4735aed9442a8e442214a23a3df94bd8fc99b5.tar.xz
Convert ByteString::{Format|FormatV} to static methods
This CL moves the Format and FormatV methods of ByteString to be static. Bug: pdfium:934 Change-Id: I9c30455a789aff9f619b9d5bf89c0712644f2d9a Reviewed-on: https://pdfium-review.googlesource.com/18650 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'xfa')
-rw-r--r--xfa/fgas/font/cfgas_pdffontmgr.cpp3
-rw-r--r--xfa/fxfa/cxfa_fontmgr.cpp3
2 files changed, 2 insertions, 4 deletions
diff --git a/xfa/fgas/font/cfgas_pdffontmgr.cpp b/xfa/fgas/font/cfgas_pdffontmgr.cpp
index 2b3f54b6a1..4d34ac8284 100644
--- a/xfa/fgas/font/cfgas_pdffontmgr.cpp
+++ b/xfa/fgas/font/cfgas_pdffontmgr.cpp
@@ -78,8 +78,7 @@ RetainPtr<CFGAS_GEFont> CFGAS_PDFFontMgr::GetFont(
CPDF_Font** pPDFFont,
bool bStrictMatch) {
uint32_t dwHashCode = FX_HashCode_GetW(wsFontFamily, false);
- ByteString strKey;
- strKey.Format("%u%u", dwHashCode, dwFontStyles);
+ ByteString strKey = ByteString::Format("%u%u", dwHashCode, dwFontStyles);
auto it = m_FontMap.find(strKey);
if (it != m_FontMap.end())
return it->second;
diff --git a/xfa/fxfa/cxfa_fontmgr.cpp b/xfa/fxfa/cxfa_fontmgr.cpp
index d144bd2cb5..0956806698 100644
--- a/xfa/fxfa/cxfa_fontmgr.cpp
+++ b/xfa/fxfa/cxfa_fontmgr.cpp
@@ -28,8 +28,7 @@ RetainPtr<CFGAS_GEFont> CXFA_FontMgr::GetFont(
const WideStringView& wsFontFamily,
uint32_t dwFontStyles) {
uint32_t dwHash = FX_HashCode_GetW(wsFontFamily, false);
- ByteString bsKey;
- bsKey.Format("%u%u%u", dwHash, dwFontStyles, 0xFFFF);
+ ByteString bsKey = ByteString::Format("%u%u%u", dwHash, dwFontStyles, 0xFFFF);
auto iter = m_FontMap.find(bsKey);
if (iter != m_FontMap.end())
return iter->second;