osl::Mutex->std::mutex in cppu::MappingsData
Change-Id: I34292537e9724d7667ba099285c87a32ae13ffad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134028 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
parent
c06b2ac50e
commit
f0ed5d4637
1 changed files with 4 additions and 4 deletions
|
@ -154,7 +154,7 @@ struct MappingsData
|
||||||
t_OUString2Entry aName2Entry;
|
t_OUString2Entry aName2Entry;
|
||||||
t_Mapping2Entry aMapping2Entry;
|
t_Mapping2Entry aMapping2Entry;
|
||||||
|
|
||||||
Mutex aCallbacksMutex;
|
std::mutex aCallbacksMutex;
|
||||||
std::set< uno_getMappingFunc >
|
std::set< uno_getMappingFunc >
|
||||||
aCallbacks;
|
aCallbacks;
|
||||||
|
|
||||||
|
@ -621,7 +621,7 @@ void SAL_CALL uno_getMapping(
|
||||||
|
|
||||||
// try callback chain
|
// try callback chain
|
||||||
{
|
{
|
||||||
MutexGuard aGuard(rData.aCallbacksMutex);
|
std::unique_lock aGuard(rData.aCallbacksMutex);
|
||||||
for (const auto& rCallback : rData.aCallbacks)
|
for (const auto& rCallback : rData.aCallbacks)
|
||||||
{
|
{
|
||||||
(*rCallback)(ppMapping, pFrom, pTo, aAddPurpose.pData);
|
(*rCallback)(ppMapping, pFrom, pTo, aAddPurpose.pData);
|
||||||
|
@ -735,7 +735,7 @@ void SAL_CALL uno_registerMappingCallback(
|
||||||
{
|
{
|
||||||
OSL_ENSURE( pCallback, "### null ptr!" );
|
OSL_ENSURE( pCallback, "### null ptr!" );
|
||||||
MappingsData & rData = getMappingsData();
|
MappingsData & rData = getMappingsData();
|
||||||
MutexGuard aGuard( rData.aCallbacksMutex );
|
std::unique_lock aGuard( rData.aCallbacksMutex );
|
||||||
rData.aCallbacks.insert( pCallback );
|
rData.aCallbacks.insert( pCallback );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -745,7 +745,7 @@ void SAL_CALL uno_revokeMappingCallback(
|
||||||
{
|
{
|
||||||
OSL_ENSURE( pCallback, "### null ptr!" );
|
OSL_ENSURE( pCallback, "### null ptr!" );
|
||||||
MappingsData & rData = getMappingsData();
|
MappingsData & rData = getMappingsData();
|
||||||
MutexGuard aGuard( rData.aCallbacksMutex );
|
std::unique_lock aGuard( rData.aCallbacksMutex );
|
||||||
rData.aCallbacks.erase( pCallback );
|
rData.aCallbacks.erase( pCallback );
|
||||||
}
|
}
|
||||||
} // extern "C"
|
} // extern "C"
|
||||||
|
|
Loading…
Reference in a new issue