cpputools : use std::mutex instead of osl::Mutex
Change-Id: I75879a0f03d8212ac9392c04fb76113cf24d510e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132300 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
committed by
Noel Grandin
parent
6784467804
commit
8fa40be492
@@ -18,6 +18,7 @@
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <mutex>
|
||||
#include <string_view>
|
||||
|
||||
#include <sal/main.h>
|
||||
@@ -229,7 +230,7 @@ class OInstanceProvider
|
||||
{
|
||||
Reference< XComponentContext > _xContext;
|
||||
|
||||
Mutex _aSingleInstanceMutex;
|
||||
std::mutex _aSingleInstanceMutex;
|
||||
Reference< XInterface > _xSingleInstance;
|
||||
bool _bSingleInstance;
|
||||
|
||||
@@ -296,7 +297,7 @@ Reference< XInterface > OInstanceProvider::getInstance( const OUString & rName )
|
||||
{
|
||||
if (! _xSingleInstance.is())
|
||||
{
|
||||
MutexGuard aGuard( _aSingleInstanceMutex );
|
||||
std::lock_guard aGuard( _aSingleInstanceMutex );
|
||||
if (! _xSingleInstance.is())
|
||||
{
|
||||
_xSingleInstance = createInstance();
|
||||
|
||||
Reference in New Issue
Block a user