sfx2/source/appl/app.cxx |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 527e33784ab35c57e997024f6322aebd909bcf59
Author:     Noel Grandin <noelgran...@gmail.com>
AuthorDate: Mon Dec 20 20:04:17 2021 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Mon Jan 3 19:17:07 2022 +0100

    osl::Mutex->std::mutex in SfxApplication::GetOrCreate
    
    Change-Id: Ieb44d6e342dda2d8aa6302f126ed0eb3fec8bf95
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127901
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/sfx2/source/appl/app.cxx b/sfx2/source/appl/app.cxx
index 42144afc33e8..5fe23fa6257f 100644
--- a/sfx2/source/appl/app.cxx
+++ b/sfx2/source/appl/app.cxx
@@ -56,6 +56,7 @@
 #include <unotools/viewoptions.hxx>
 #include <rtl/strbuf.hxx>
 #include <memory>
+#include <mutex>
 #include <framework/sfxhelperfunctions.hxx>
 #include <fwkhelper.hxx>
 
@@ -100,10 +101,10 @@ namespace {
 
 SfxApplication* SfxApplication::GetOrCreate()
 {
-    static osl::Mutex theApplicationMutex;
+    static std::mutex theApplicationMutex;
 
     // SFX on demand
-    ::osl::MutexGuard aGuard(theApplicationMutex);
+    std::unique_lock aGuard(theApplicationMutex);
     if (!g_pSfxApplication)
     {
         SAL_INFO( "sfx.appl", "SfxApplication::SetApp" );

Reply via email to