From 88999eb03b788b83d27d1d784f0ec7ba792ac954 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 18 Mar 2014 12:58:46 +0100 Subject: Use cppu::BaseMutex instead of plain osl::Mutex as base Change-Id: Id169891e60eb0a19899586fd3c9a9325ef9d1236 --- cppuhelper/source/servicemanager.hxx | 6 ++++-- cppuhelper/source/typemanager.cxx | 2 +- cppuhelper/source/typemanager.hxx | 4 ++-- 3 files changed, 7 insertions(+), 5 deletions(-) (limited to 'cppuhelper') diff --git a/cppuhelper/source/servicemanager.hxx b/cppuhelper/source/servicemanager.hxx index f62fe1dd7de2..d4f9d7b0beca 100644 --- a/cppuhelper/source/servicemanager.hxx +++ b/cppuhelper/source/servicemanager.hxx @@ -29,6 +29,7 @@ #include "com/sun/star/lang/XSingleServiceFactory.hpp" #include "com/sun/star/uno/XComponentContext.hpp" #include "com/sun/star/uno/Reference.hxx" +#include "cppuhelper/basemutex.hxx" #include "cppuhelper/compbase8.hxx" #include "osl/mutex.hxx" #include "registry/registry.hxx" @@ -57,7 +58,8 @@ typedef cppu::WeakComponentImplHelper8< ServiceManagerBase; class ServiceManager: - private osl::Mutex, public ServiceManagerBase, private boost::noncopyable + private cppu::BaseMutex, public ServiceManagerBase, + private boost::noncopyable { public: struct Data: private boost::noncopyable { @@ -174,7 +176,7 @@ public: ImplementationMap singletons; }; - ServiceManager(): ServiceManagerBase(*static_cast< osl::Mutex * >(this)) {} + ServiceManager(): ServiceManagerBase(m_aMutex) {} using ServiceManagerBase::acquire; using ServiceManagerBase::release; diff --git a/cppuhelper/source/typemanager.cxx b/cppuhelper/source/typemanager.cxx index 57a67bb98fd1..d6d408f22574 100644 --- a/cppuhelper/source/typemanager.cxx +++ b/cppuhelper/source/typemanager.cxx @@ -1865,7 +1865,7 @@ void Enumeration::findNextMatch() { } cppuhelper::TypeManager::TypeManager(): - TypeManager_Base(*static_cast< osl::Mutex * >(this)), + TypeManager_Base(m_aMutex), manager_(new unoidl::Manager) {} diff --git a/cppuhelper/source/typemanager.hxx b/cppuhelper/source/typemanager.hxx index 14a41542cb9e..92976ef92485 100644 --- a/cppuhelper/source/typemanager.hxx +++ b/cppuhelper/source/typemanager.hxx @@ -25,8 +25,8 @@ #include "com/sun/star/uno/Reference.hxx" #include "com/sun/star/uno/RuntimeException.hpp" #include "com/sun/star/uno/Sequence.hxx" +#include "cppuhelper/basemutex.hxx" #include "cppuhelper/compbase4.hxx" -#include "osl/mutex.hxx" #include "rtl/ref.hxx" #include "sal/types.h" @@ -49,7 +49,7 @@ typedef cppu::WeakComponentImplHelper4< css::container::XSet, css::reflection::XTypeDescriptionEnumerationAccess > TypeManager_Base; -class TypeManager: private osl::Mutex, public TypeManager_Base { +class TypeManager: private cppu::BaseMutex, public TypeManager_Base { public: TypeManager(); -- cgit v1.2.3