From b5bec747cc9af01167431f35339eff4085693ebc Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Mon, 3 Feb 2020 16:49:45 +0100 Subject: Silence -Werror,-Wunused-variable (clang-cl) Change-Id: Icbf3b6f8f1259e7e50f64e2885b1604f1a98f485 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87894 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- vcl/win/gdi/salfont.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'vcl/win/gdi') diff --git a/vcl/win/gdi/salfont.cxx b/vcl/win/gdi/salfont.cxx index ccc1138e6d54..73c0bf7f2eb9 100644 --- a/vcl/win/gdi/salfont.cxx +++ b/vcl/win/gdi/salfont.cxx @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -1210,7 +1211,8 @@ bool WinSalGraphics::AddTempDevFont(PhysicalFontCollection* pFontCollection, void WinSalGraphics::GetDevFontList( PhysicalFontCollection* pFontCollection ) { // make sure all LO shared fonts are registered temporarily - static bool bOnce = []() + static std::once_flag init; + std::call_once(init, []() { auto registerFontsIn = [](const OUString& dir) { // collect fonts in font path that could not be registered @@ -1246,7 +1248,7 @@ void WinSalGraphics::GetDevFontList( PhysicalFontCollection* pFontCollection ) registerFontsIn(aPath + "/" LIBO_SHARE_FOLDER "/fonts/truetype"); return true; - }(); + }); ImplEnumInfo aInfo; aInfo.mhDC = getHDC(); -- cgit