summaryrefslogtreecommitdiff
path: root/animations/source
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2022-05-07 08:55:07 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-05-07 14:24:10 +0200
commite855dc52266eab9b43f5f2f679c84eb6e30be46e (patch)
tree7e117d905fa884295799bd2fea647649cca8a989 /animations/source
parent09122ed302fd3d77718ee1a63d2ca4d5d7a0ace8 (diff)
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>
Diffstat (limited to 'animations/source')
-rw-r--r--animations/source/animcore/animcore.cxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/animations/source/animcore/animcore.cxx b/animations/source/animcore/animcore.cxx
index f72c15701b53..c02ba3ca2878 100644
--- a/animations/source/animcore/animcore.cxx
+++ b/animations/source/animcore/animcore.cxx
@@ -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();