diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-12-03 11:32:46 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-12-03 18:00:03 +0100 |
commit | 42387cd10802912891fc2b7554e92d5c0c79b0f1 (patch) | |
tree | b92d517d13bd80eb3429b6e478ce384f0531b90c /include/comphelper | |
parent | 9b0202bf43133fd440fae62ccb4727dafb2da211 (diff) |
improve member field name
Change-Id: Ib4e3bda523364a3f8f0d95a764833765ac8c3f82
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126282
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/comphelper')
-rw-r--r-- | include/comphelper/interfacecontainer3.hxx | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/include/comphelper/interfacecontainer3.hxx b/include/comphelper/interfacecontainer3.hxx index 5c087c668669..5dc5fb66aa6d 100644 --- a/include/comphelper/interfacecontainer3.hxx +++ b/include/comphelper/interfacecontainer3.hxx @@ -16,8 +16,7 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef INCLUDED_COMPHELPER_INTERFACECONTAINER3_H -#define INCLUDED_COMPHELPER_INTERFACECONTAINER3_H +#pragma once #include <sal/config.h> @@ -129,7 +128,7 @@ public: of this object. */ OInterfaceContainerHelper3(::osl::Mutex& rMutex_) - : rMutex(rMutex_) + : mrMutex(rMutex_) { } /** @@ -222,7 +221,7 @@ private: o3tl::cow_wrapper<std::vector<css::uno::Reference<ListenerT>>, o3tl::ThreadSafeRefCountingPolicy> maData; - ::osl::Mutex& rMutex; + ::osl::Mutex& mrMutex; OInterfaceContainerHelper3(const OInterfaceContainerHelper3&) = delete; OInterfaceContainerHelper3& operator=(const OInterfaceContainerHelper3&) = delete; @@ -278,7 +277,7 @@ inline void OInterfaceContainerHelper3<ListenerT>::notifyEach( template <class ListenerT> sal_Int32 OInterfaceContainerHelper3<ListenerT>::getLength() const { - osl::MutexGuard aGuard(rMutex); + osl::MutexGuard aGuard(mrMutex); return maData->size(); } @@ -287,7 +286,7 @@ std::vector<css::uno::Reference<ListenerT>> OInterfaceContainerHelper3<ListenerT>::getElements() const { std::vector<css::uno::Reference<ListenerT>> rVec; - osl::MutexGuard aGuard(rMutex); + osl::MutexGuard aGuard(mrMutex); rVec = *maData; return rVec; } @@ -297,7 +296,7 @@ sal_Int32 OInterfaceContainerHelper3<ListenerT>::addInterface(const css::uno::Reference<ListenerT>& rListener) { assert(rListener.is()); - osl::MutexGuard aGuard(rMutex); + osl::MutexGuard aGuard(mrMutex); maData->push_back(rListener); return maData->size(); @@ -308,7 +307,7 @@ sal_Int32 OInterfaceContainerHelper3<ListenerT>::removeInterface( const css::uno::Reference<ListenerT>& rListener) { assert(rListener.is()); - osl::MutexGuard aGuard(rMutex); + osl::MutexGuard aGuard(mrMutex); // It is not valid to compare the pointer directly, but it's faster. auto it = std::find_if(maData->begin(), maData->end(), @@ -330,7 +329,7 @@ template <class ListenerT> const css::uno::Reference<ListenerT>& OInterfaceContainerHelper3<ListenerT>::getInterface(sal_Int32 nIndex) const { - osl::MutexGuard aGuard(rMutex); + osl::MutexGuard aGuard(mrMutex); return (*maData)[nIndex]; } @@ -338,7 +337,7 @@ OInterfaceContainerHelper3<ListenerT>::getInterface(sal_Int32 nIndex) const template <class ListenerT> void OInterfaceContainerHelper3<ListenerT>::disposeAndClear(const css::lang::EventObject& rEvt) { - osl::ClearableMutexGuard aGuard(rMutex); + osl::ClearableMutexGuard aGuard(mrMutex); OInterfaceIteratorHelper3<ListenerT> aIt(*this); maData->clear(); aGuard.clear(); @@ -358,10 +357,9 @@ void OInterfaceContainerHelper3<ListenerT>::disposeAndClear(const css::lang::Eve template <class ListenerT> void OInterfaceContainerHelper3<ListenerT>::clear() { - osl::MutexGuard aGuard(rMutex); + osl::MutexGuard aGuard(mrMutex); maData->clear(); } } -#endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |