summaryrefslogtreecommitdiff
path: root/vcl/win/gdi
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-02-03 16:49:45 +0100
committerStephan Bergmann <sbergman@redhat.com>2020-02-03 20:40:11 +0100
commitb5bec747cc9af01167431f35339eff4085693ebc (patch)
tree16b7fc468a374376693aeba6fe427f070c83d9e9 /vcl/win/gdi
parentb3b7584a031118e51eefe3a1de2497639a96ef00 (diff)
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 <sbergman@redhat.com>
Diffstat (limited to 'vcl/win/gdi')
-rw-r--r--vcl/win/gdi/salfont.cxx6
1 files changed, 4 insertions, 2 deletions
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 <algorithm>
#include <map>
#include <memory>
+#include <mutex>
#include <set>
#include <string.h>
#include <svsys.h>
@@ -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();