summaryrefslogtreecommitdiff
path: root/xfa/fgas
diff options
context:
space:
mode:
authorHenrique Nakashima <hnakashima@chromium.org>2017-12-07 18:45:54 +0000
committerChromium commit bot <commit-bot@chromium.org>2017-12-07 18:45:54 +0000
commit67454716002f2f5eae85cef4d382ecfc0e9b266d (patch)
treea34315e615a70a2592e373ff46b9a7c1421e595b /xfa/fgas
parent39a076f19c05ac1ebb4f1dd15f9835ffb8611ae0 (diff)
downloadpdfium-67454716002f2f5eae85cef4d382ecfc0e9b266d.tar.xz
Add WARN_UNUSED_RESULT to ByteString::Format* methods.
Change-Id: I0caba99cb8e99ea5af49d906b576f580275620bb Reviewed-on: https://pdfium-review.googlesource.com/20570 Reviewed-by: dsinclair <dsinclair@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Diffstat (limited to 'xfa/fgas')
-rw-r--r--xfa/fgas/font/cfgas_fontmgr.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/xfa/fgas/font/cfgas_fontmgr.cpp b/xfa/fgas/font/cfgas_fontmgr.cpp
index 2647eb52c7..862e9299b5 100644
--- a/xfa/fgas/font/cfgas_fontmgr.cpp
+++ b/xfa/fgas/font/cfgas_fontmgr.cpp
@@ -1010,11 +1010,12 @@ RetainPtr<CFGAS_GEFont> CFGAS_FontMgr::GetFontByUnicode(
uint16_t wCodePage = x ? x->wCodePage : 0xFFFF;
uint16_t wBitField = x ? x->wBitField : 0x03E7;
ByteString bsHash;
- if (wCodePage == 0xFFFF)
+ if (wCodePage == 0xFFFF) {
bsHash =
ByteString::Format("%d, %d, %d", wCodePage, wBitField, dwFontStyles);
- else
+ } else {
bsHash = ByteString::Format("%d, %d", wCodePage, dwFontStyles);
+ }
bsHash += FX_UTF8Encode(WideStringView(pszFontFamily));
uint32_t dwHash = FX_HashCode_GetA(bsHash.AsStringView(), false);
std::vector<RetainPtr<CFGAS_GEFont>>* pFonts = &m_Hash2Fonts[dwHash];