vcl/win/gdi/salfont.cxx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)
New commits: commit e9262729e6b41065596af8092905bafe986803e9 Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Sat Sep 17 12:52:53 2022 +0200 Commit: Stephan Bergmann <sberg...@redhat.com> CommitDate: Mon Sep 19 23:14:05 2022 +0200 loplugin:unreffun (clang-cl) ...and with ScopedFontHDC::fsp gone, there appears to be no reason to keep ScopedFontHDC::m_aFSP alive for the whole lifetime of the ScopedFontHDC instance Change-Id: I1028bc24f49f3bbaf6e23c09aef4459418267154 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140100 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sberg...@redhat.com> diff --git a/vcl/win/gdi/salfont.cxx b/vcl/win/gdi/salfont.cxx index a126dffb3ebd..058c24284cc9 100644 --- a/vcl/win/gdi/salfont.cxx +++ b/vcl/win/gdi/salfont.cxx @@ -1456,15 +1456,15 @@ class ScopedFontHDC final public: explicit ScopedFontHDC(WinSalGraphics& rGraphics, const vcl::font::PhysicalFontFace& rFontFace) // use height=1000 for easier debugging (to match psprint's font units) - : m_aFSP(rFontFace, Size(0,1000), 1000.0, 0, false) - , m_hDC(nullptr) + : m_hDC(nullptr) , m_hOrigFont(nullptr) { m_hDC = CreateCompatibleDC(rGraphics.getHDC()); if (!m_hDC) return; - rGraphics.ImplDoSetFont(m_hDC, m_aFSP, &rFontFace, m_hOrigFont); + vcl::font::FontSelectPattern aFSP(rFontFace, Size(0,1000), 1000.0, 0, false); + rGraphics.ImplDoSetFont(m_hDC, aFSP, &rFontFace, m_hOrigFont); } ~ScopedFontHDC() @@ -1476,10 +1476,8 @@ public: } HDC hdc() const { return m_hDC; } - const vcl::font::FontSelectPattern& fsp() const { return m_aFSP; } private: - vcl::font::FontSelectPattern m_aFSP; HDC m_hDC; HFONT m_hOrigFont; };