diff options
author | Tom Sepez <tsepez@chromium.org> | 2017-04-07 16:58:00 -0700 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-04-10 16:33:54 +0000 |
commit | ec8ff7d258ef25f7e3193572aeef220ff86784f0 (patch) | |
tree | 1c72cae7e3b43908840c9a6881b239850933680b /core/fxge/win32 | |
parent | 84b596d64aab8f8c6dd6145e9c210b145fc5631a (diff) | |
download | pdfium-ec8ff7d258ef25f7e3193572aeef220ff86784f0.tar.xz |
Fix bytestring passing conventions, part 2.
Change pass by reference to const reference or pointer.
Change-Id: Ic007f14e6569679a846980a96cc627eac4ecd5d6
Reviewed-on: https://pdfium-review.googlesource.com/3953
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fxge/win32')
-rw-r--r-- | core/fxge/win32/fx_win32_device.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/core/fxge/win32/fx_win32_device.cpp b/core/fxge/win32/fx_win32_device.cpp index 39533e1ef6..73a1ac6a0e 100644 --- a/core/fxge/win32/fx_win32_device.cpp +++ b/core/fxge/win32/fx_win32_device.cpp @@ -347,8 +347,8 @@ class CFX_Win32FontInfo final : public IFX_SystemFontInfo { uint32_t table, uint8_t* buffer, uint32_t size) override; - bool GetFaceName(void* hFont, CFX_ByteString& name) override; - bool GetFontCharset(void* hFont, int& charset) override; + bool GetFaceName(void* hFont, CFX_ByteString* name) override; + bool GetFontCharset(void* hFont, int* charset) override; void DeleteFont(void* hFont) override; bool IsOpenTypeFromDiv(const LOGFONTA* plf); @@ -664,7 +664,7 @@ uint32_t CFX_Win32FontInfo::GetFontData(void* hFont, return size; } -bool CFX_Win32FontInfo::GetFaceName(void* hFont, CFX_ByteString& name) { +bool CFX_Win32FontInfo::GetFaceName(void* hFont, CFX_ByteString* name) { char facebuf[100]; HFONT hOldFont = (HFONT)::SelectObject(m_hDC, (HFONT)hFont); int ret = ::GetTextFaceA(m_hDC, 100, facebuf); @@ -672,16 +672,16 @@ bool CFX_Win32FontInfo::GetFaceName(void* hFont, CFX_ByteString& name) { if (ret == 0) { return false; } - name = facebuf; + *name = facebuf; return true; } -bool CFX_Win32FontInfo::GetFontCharset(void* hFont, int& charset) { +bool CFX_Win32FontInfo::GetFontCharset(void* hFont, int* charset) { TEXTMETRIC tm; HFONT hOldFont = (HFONT)::SelectObject(m_hDC, (HFONT)hFont); ::GetTextMetrics(m_hDC, &tm); ::SelectObject(m_hDC, hOldFont); - charset = tm.tmCharSet; + *charset = tm.tmCharSet; return true; } |