[Libreoffice-commits] core.git: vcl/win

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Mon Feb 3 19:42:41 UTC 2020


 vcl/win/gdi/salfont.cxx |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit b5bec747cc9af01167431f35339eff4085693ebc
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Mon Feb 3 16:49:45 2020 +0100
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Mon Feb 3 20:40:11 2020 +0100

    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 at redhat.com>

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();


More information about the Libreoffice-commits mailing list