osl::Mutex->std::mutex in TimeContainerEnumeration

Change-Id: I44e054a6db59cbeae03b50cb0df4bcfdc8f293da
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133969
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin 2022-05-07 08:55:07 +02:00 committed by Noel Grandin
parent 09122ed302
commit e855dc5226

View File

@ -60,6 +60,7 @@
#include <array>
#include <vector>
#include <algorithm>
#include <mutex>
namespace com::sun::star::uno { class XComponentContext; }
namespace com::sun::star::beans { struct NamedValue; }
@ -366,8 +367,7 @@ private:
};
class TimeContainerEnumeration : private cppu::BaseMutex,
public ::cppu::WeakImplHelper< XEnumeration >
class TimeContainerEnumeration : public ::cppu::WeakImplHelper< XEnumeration >
{
public:
explicit TimeContainerEnumeration( std::vector< Reference< XAnimationNode > >&& rChildren );
@ -377,6 +377,8 @@ public:
virtual Any SAL_CALL nextElement( ) override;
private:
std::mutex m_aMutex;
/** sorted list of child nodes */
std::vector< Reference< XAnimationNode > > maChildren;
@ -395,14 +397,14 @@ TimeContainerEnumeration::TimeContainerEnumeration( std::vector< Reference< XAni
// Methods
sal_Bool SAL_CALL TimeContainerEnumeration::hasMoreElements()
{
Guard< Mutex > aGuard( m_aMutex );
std::unique_lock aGuard( m_aMutex );
return maIter != maChildren.end();
}
Any SAL_CALL TimeContainerEnumeration::nextElement()
{
Guard< Mutex > aGuard( m_aMutex );
std::unique_lock aGuard( m_aMutex );
if( maIter == maChildren.end() )
throw NoSuchElementException();